| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository is deprecated. Please use the new master provided by codeception.
Visual regression tests integrated in Codeception.
This module can be used to compare the current representation of a website element with an expected. It was written on the shoulders of codeception and integrates in a very easy way.
Example
VisualCeption uses a combination of the "make a screenshot" feature in webdriver, imagick and jquery to compare visual elements on a website. This comparison is done in five steps:
VisualCeption needs the following components to run:
Add the module to _bootstrap.php.
include_once "/path/to/module/VisualCeption.php"; include_once "/path/to/module/ImageDeviationException.php";
To use the VisualCeption module you have to configure it.
Example Configuration
modules:
enabled: [WebDriver, VisualCeption]
VisualCeption:
referenceImageDir: /home/codeception/referenceImages/ # Path to the reference folder (optional, standard is
# <datadir>/VisualCeption/)
maximumDeviation: 5 # deviation in percent
saveCurrentImageIfFailure: true # if true, VisualCeption saves the current
# image in debug dir (default: false)VisualCeption is really easy to use. There are only two methods that will be added to your WebGuy seeVisualChanges and dontSeeVisualChanges.
$I->seeVisualChanges( "uniqueIdentifier1", "elementId1" );
$I->dontSeeVisualChanges( "uniqueIdentifier2", "elementId2" );
$I->dontSeeVisualChanges( "uniqueIdentifier3", "elementId3" [, array("excludeElement1", "excludeElement2")] );Example Usage
$I->seeVisualChanges( "subNavigation", "#subNav" );
$I->dontSeeVisualChanges("content", "div.content", array("#intro"));If you need more information about the test run please use the command line debug option (-d).
VisualCeption uses the WebDriver module for making the screenshots. As a consequence we are not able to take screenshots via google chrome as the chromedriver does not allow full page screenshots.
| Back | FazBrowse Home | New Git URL |