zodyac / behat-perceptual-diff-extension
Perceptual diff extension for Behat
Installs: 159
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 41
Forks: 5
Open Issues: 1
Type:behat-extension
Requires
- php: >=5.3.2
- behat/behat: ~2.4.6
- behat/mink: ~1.5.0
- behat/mink-extension: ~1.1.4
- behat/mink-selenium2-driver: ~1.1.1
Suggests
- zodyac/behat-extensible-html-formatter: Allows the peceptual diffs to be viewed in the HTML formatter output.
This package is not auto-updated.
Last update: 2021-04-11 22:12:37 UTC
README
A perceptual diff extension for Behat to highlight visual regressions in web applications.
After each step a screenshot is taken and compared with the screenshot from a previous baseline test run. Any differences will be highlighted and output in the HTML report for inspection.
For more on the benefits of perceptual diffs see @bslatkin's great video:
http://www.youtube.com/watch?v=UMnZiTL0tUc
Getting started
Running everything locally (Mac OS X specific)
Download Selenium2 standalone server package and run the JAR
java -jar selenium-server-standalone-2.33.0.jar
Install ImageMagick with Homebrew
brew install imagemagick
Install Composer dependencies
composer install --dev
Run the example tests
cd example && ../vendor/bin/behat --format=pretty,html --out=,report.html
Acknowledgements
- Brett Slatkin for his brilliant presentation on how they use perceptual diffs at Google.
- Pete Hunt for his Huxley tool that also inspired this project.
Credits
- Tom Graham - Project lead