<div dir="ltr"><br><div><br></div><div>Language people also working on screen shots: <a href="https://gerrit.wikimedia.org/r/#/c/127899/">https://gerrit.wikimedia.org/r/#/c/127899/</a> </div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 21, 2014 at 2:25 PM, Juliusz Gonera <span dir="ltr"><<a href="mailto:jgonera@wikimedia.org" target="_blank">jgonera@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nope, it's an early prototype. It basically only makes an updated Cucumber test fail if new screenshot differs from reference screenshot by more than X%. Adding visual comparison of two screenshots would be the next step and would not be too hard. I might work on it one evening this week.<div class="HOEnZb">
<div class="h5"><br>
<br>
<br>
On 04/21/2014 11:42 AM, Tomasz Finc wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Great. Eager to see us test with this.<br>
<br>
Do we have any of its early screenshot comparisons up?<br>
<br>
--tomasz<br>
<br>
On Fri, Apr 18, 2014 at 4:33 PM, Juliusz Gonera <<a href="mailto:jgonera@wikimedia.org" target="_blank">jgonera@wikimedia.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I conducted a little bit of research on visual regression testing, mainly<br>
for the mobile team for now, but it could be easily reused for other teams.<br>
I had a look at three existing solutions that seem somewhat popular and are<br>
actively developed:<br>
<br>
* Wraith (<a href="https://github.com/BBC-News/wraith" target="_blank">https://github.com/BBC-News/<u></u>wraith</a>)<br>
* PhantomCSS (<a href="https://github.com/Huddle/PhantomCSS" target="_blank">https://github.com/Huddle/<u></u>PhantomCSS</a>)<br>
* Huxley (<a href="https://github.com/facebook/huxley" target="_blank">https://github.com/facebook/<u></u>huxley</a>)<br>
<br>
They all have their own pros and cons, but in my opinion they share one<br>
important disadvantage: they can't be easily integrated with our current<br>
browser testing setup. For all the aforementioned tools we would have to<br>
create from scratch a completely separate set of tests just for visual<br>
regression testing instead of extending our existing browser tests.<br>
<br>
I spent a few hours in my spare time tinkering with an alternative idea<br>
which would enable us to add visual regression testing to our Cucumber/Watir<br>
tests. The result is a small prototype available at<br>
<a href="https://github.com/jgonera/photographer" target="_blank">https://github.com/jgonera/<u></u>photographer</a>. There is no docs or anything yet,<br>
but I prepared a simple demo patch for MobileFrontend:<br>
<a href="https://gerrit.wikimedia.org/r/#/c/126878/" target="_blank">https://gerrit.wikimedia.org/<u></u>r/#/c/126878/</a>.<br>
<br>
The idea is to add a new method for Cucumber steps (snap) that takes a<br>
screenshot of the current browser state and compares it with a screenshot<br>
taken in one of the previous test runs. To update screenshots that are used<br>
as a reference you run tests with env var PHOTOGRAPHER=update. If newly<br>
taken screenshot differs by too many pixels from an old one, the test will<br>
fail.<br>
<br>
It's still only an early prototype, but I'd appreciate any comments about<br>
this idea.<br>
<br>
--<br>
Juliusz<br>
<br>
______________________________<u></u>_________________<br>
Mobile-l mailing list<br>
<a href="mailto:Mobile-l@lists.wikimedia.org" target="_blank">Mobile-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/mobile-l" target="_blank">https://lists.wikimedia.org/<u></u>mailman/listinfo/mobile-l</a><br>
</blockquote></blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org" target="_blank">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/<u></u>mailman/listinfo/qa</a><br>
</div></div></blockquote></div><br></div>