Perceptual diff extension for Behat

Installs: 89

Dependents: 1

Stars: 10

Watchers: 28

Forks: 6

Open Issues: 1

Type: behat-extension

v0.1.0 2013-08-03 16:19 UTC


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:


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


  • 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.