Bug ID: 62633
           Summary: Jenkins: Set up perceptual diffs
           Product: Wikimedia
           Version: wmf-deployment
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Continuous integration
       Web browser: ---
   Mobile Platform: ---

This is something I've been experimenting with in my spare time for a while and
think it's time to do this.

The idea is: Render a visual diff for one or more urls (comparing the change to
the latest version of the target branch).

* Talk (Velocity 2013):
* Talk (Google Developers):

Behind it all is basically just a ImageMagick compare command[1][2][3][4]
between two PNGs.

The PNGs would be created using PhantomJS' render() API.

Jenkins job macro for this:

* For core and extensions, this would be installing MediaWiki and exposing it
in the local Apache, for client-side libraries like VisualEditor and OOjs UI,
this is just running a build script and exposing their demo/ directory in the
local Apache

* Create PNGs for all the configures urls (relative paths to their webroot,
we'd prefix our apache server + unique subdirectory to this).

* Compare them against the ones from the previous post-merge job (stores
somewhere persistently by repository/branch/url).

* If different, make sure the latest.png/change-after.png/change-diff.png for
that url is kept and stored as build artefacts (we should clear them after some
time as they'll grow quickly, as optimisation we can delete them within the job
if there is no diff).

From the post-merge job:

* Run the main macro.
* Copy the created screenshots to the persistent "latest" directory for
comparison by the next unmerged patch set test.


A few example urls for different repositories that we would want visual
regression testing.




[4] compare
      -metric RMSE
      -highlight-color RED
      -compose Src

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to