You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,21 @@
1
1
# VisualCeption
2
2
Visual regression tests integrated in [Codeception](http://codeception.com/).
3
3
4
-
## Documenation todo
5
-
* run twice
6
-
* phantom css
7
-
* example image
8
-
* license
9
-
* how it works
4
+
This module can be used to compare the current representation of a website element with an expeted. It was written on the shoulders of codeception and integrates in a very easy way.
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 four steps:
13
+
14
+
1.**Take a screenshot** of the full page using webdriver.
15
+
2.**Calculate the position** and size of the selected element using jquery.
16
+
3.**Crop the element** out of the full screenshot using imagick.
17
+
4.**Compare the element** with an older version of the screenshot that has been proofed as valid using imagick. If no previous image exists the current image will be used fur future comparions. As an effect of this approach the test has to be **run twice** before it works.
18
+
5. If the deviation is too high **throw an exception** that is caught by Codeception.
0 commit comments