Giter Site home page Giter Site logo

snapandcompare's Introduction

Snap And Compare

SnapAndCompare is an easy to use screenshot comparison tool used for CSS Visual Regression Testing built using NodeJS.

NO CODE...JUST CONFIGS.

It can compare against a single environment or dual and will produce visuals and equality stats on image comparisons.

Run in standalone mode or if you give a watchFile will run everytime that is updated/saved (useful for SASS development).

Examples:

Master image

Setup:

Download and install NodeJS

http://nodejs.org/download/

Download and install GraphicMagick (gm)

brew install graphicsmagick

Or if that doesn't work install from source (http://www.graphicsmagick.org/download.html).

./configure
make
sudo make install

Download app dependencies

npm install

Usage:

Update the config.js file to hold the masterUrl and diffUrl you need (they are often the same but not always) Run (first builds initial snapshot, second builds diff and compares):

node snapandcompare.js
node snapandcompare.js

How does the logic work:

Without a watchFile:

First run : For all Breakpoints will check if a master image exists, if not will create one.

Second run: For all Breakpoints will find the master image, create a new .diff image and run a comparison on the two producing a .fail image and flagging up if the images differ.

After that: For each Breakpoint it will either compare against the diff or download a new Master image (depending on what already exists in /screenshots).

With a watchFile:

It will continually run on save of the file. It will flag up the status of each Breakpoint as PASS or FAIL.

First run: On save of watchFile it will create the Master files after that will run the comparison evertime it detects a change.

Testing:

  • Swap the config files and run the program to test. ('./config') for ('./config.test').

Research:

snapandcompare's People

Contributors

craigtaub avatar

Stargazers

Naoki Aridome avatar Yasin Değer avatar Mark Shelton avatar Sylvie.Z avatar Mahesh kumar BR(mahesh.kumarbr@unilever.com) avatar José Wenceslao Castillo avatar Moshe Jonathan Gordon Radian avatar Matthew avatar  avatar David Luu avatar  avatar Andrew Hall avatar fff... avatar  avatar Gabriel Dumitrescu avatar Bruno Gomes avatar maboiteaspam avatar Ray Patterson avatar Misha Yurasov avatar Aleksandar Vidakovic avatar

Watchers

 avatar

Forkers

stevenchin jbelke

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.