pytest-selenium-pdiff
A pytest package implementing perceptualdiff for Selenium tests.
- Free software: MIT license
- Documentation: https://pytest-selenium-pdiff.readthedocs.org.
Features
- Embeds screenshots in pytest-html reports
- Supports ImageMagick or perceptualdiff for image comparison.
Use with pytest-html and pytest-selenium
By default pytest-selenium will embed a screenshot depicting the current browser state. This will lead to a duplicated screenshot because of this plugin's behavior. At this time the best way to exclude the pytest-selenium screenshot is to set the environment variable SELENIUM_EXCLUDE_DEBUG=screenshot
.
Working With This Repo
Setup
- Set up and activate virtual environment in the repo by
running:
virtualenv venv
and thensource venv/bin/activate
- Run
pip install -r requirements_dev.txt
- Install PhantomJS with
brew install phantomjs
- Run
tox
to run the tests for the repo
Making a release
For Rentlytics employees, to release new code for the pytest-selenium-pdiff project to pypi, follow these steps:
- run
bumpversion
to bump the version - make sure there is a file in the home directory
~/.pypirc
with the login credentials for PyPi. For more about how to upload to PyPi, see this link - run
make release
to push the new code to PyPi