Skip to content

Instantly share code, notes, and snippets.

@lassediercks
Last active March 15, 2016 19:53
Show Gist options
  • Save lassediercks/9a0251f704f55d845f4f to your computer and use it in GitHub Desktop.
Save lassediercks/9a0251f704f55d845f4f to your computer and use it in GitHub Desktop.
Visual regression testing idea

#Visual regression testing idea

Visual regression testing is pretty asked in big applications because of several reason but I expierienced that they're pretty hard to setup. I'm thinking of a way easier approach than screenshoting and doing pixel diffs.

The idea is the following:

  1. Define a list of all Html elements that should be watched
  2. With a styling change, define on which element you expect a change
  3. Simply diff the "getComputedStyle" of every element on this list
@Xiphe
Copy link

Xiphe commented Mar 15, 2016

braindump:

  • this does not catch position of elements to each other
  • in order to catch unexpected changes something needs to know the previous style
    that could be a service or checked in which the change itself
  • the previous point does not really simplify things compared to image based regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment