Skip to main content

Behat

We have a behat context that allows you to create screenshots along the way of executing your behat tests.

For example:


Feature: Diffy example
  Provide simple example how to use
  Diffy in Behat.

  @javascript
  Scenario: Create set of screenshots, send to Diffy and run comparison

    # Create screenshots from two pages and send them to Diffy
    Given I am on "/"
    Then I take screenshots for all breakpoints

    Given I am on "/wordpress"
    Then I take screenshots for all breakpoints

    Then Send screenshots to diffy with name "first test"

 

For more details check https://github.com/DiffyWebsite/diffy-behat.