3 Replies Latest reply on May 9, 2014 5:56 AM by Karel Piwko

    Visual Regressions with Drone

    Alex Soto Newbie



      today I was reading a project called Huxley (https://github.com/facebook/huxley) that basically it can be used to record page navigation and take screenshots of each page. The first time these images are recorded and saved as baseline, and then you can replay the same recording and the framework compares the baseline screenshots with the current ones, and if they are much different, it makes the test fail. I think that this is really intereseting feature to be used in some kind of regression tests where you want to know that the webpage is still looking as the previous execution, and that for example you have not touched a css file and the whole webpage becomes disordered. But what I don't like about this project is that it is not integrated with IDE or Java world in general because it is written in python (I have nothing against python) and that you need to record your test, I think that if you have already written your tests (let's say with Drone), you don't have to create a new record.


      So I am not sure if this is a feature for Drone, Graphene or Arquillian-Reporter, but it would be intereseting to have something like a system property that can be set as baseline directory which says "ok I want to execute all the tests in baseline mode and please store the screenshots in set directory", and the screenshots of the tests are stored in that given directory (which will be used as baseline). And then you can unset the property, and setting as extension property the baseline directory you can rerun the tests and makes the comparision of screenshots against baseline screenshots. Here there is an algorithm to make image comparisions http://rosettacode.org/wiki/Percentage_difference_between_images


      What do you think about this use case? Do you think it has sense to implement it in Drone?