Giter VIP home page Giter VIP logo

cssdog's Introduction

cssdog

A small cli tool for performing root-level css regression testing on static html. This tool is also programmable from within node.

The implementation leverages Resemble.js, launching Casper and PhantomJS as a child process.

File (input) selection is powered by glob.

Unlike other css regression tools, cssdog does not baseline images. cssdog instead baselines the input html, seeking to ease the pains of performing cross-system visual regression testing. New screenshots of baselined html are captured during each regression test.

$ cssdog "html/{,**/}*.html" -h
node cssdog <input glob> [options...]

Options:
  --version                 Show version number                        [boolean]
  -a, --artifactsDirectory  location where intermediary results and failures are
                            stored.            [string] [default: "./artifacts"]
  -b, --baselinesDirectory  location where from where baselines are loaded and
                            stored. Defaults to ./{{artifactsDirectory}}/
                            baselines                                   [string]
  -d, --dirty               do not clean up comparison artifacts and results
                            following a run.          [boolean] [default: false]
  -r, --rebase              create a new baseline. this will delete your current
                            baseline snapshots.       [boolean] [default: false]
  -s, --timeout             regression test timeout in seconds. Defaults to 5
                            seconds.                                [default: 5]
  -t, --tolerance           mismatch tolerance. Increasing this value will
                            decrease test coverage. Defaults to 0.01%.
                                                                 [default: 0.01]
  -v, --verbose             whether to print log messages to stdout
                                                      [boolean] [default: false]
  --no-colors               disable colorized output  [boolean] [default: false]
  -h                        Show help                                  [boolean]

cssdog's People

Contributors

davidgwking avatar seangarner avatar svedbg avatar

Watchers

 avatar  avatar

cssdog's Issues

ReferenceError: Can't find variable: process

Encountered a bug:

$ node_modules/.bin/cssdog _build/index.html
Test file: <projectdir>/node_modules/cssdog/lib/casper/regression-test.js
# Regression Test
FAIL ReferenceError: Can't find variable: process
#    type: uncaughtError
#    file: <projectdir>/node_modules/cssdog/lib/casper/regression-test.js:67
#    error: Can't find variable: process
#           ReferenceError: Can't find variable: process
#               at <projectdir>node_modules/cssdog/node_modules/path-browserify/index.js:67
#               at <projectdir>/node_modules/cssdog/node_modules/path-browserify/index.js:132
#               at getRelativePath (<projectdir>/node_modules/cssdog/lib/casper/regression-test.js:341)
#               at getBaselinePath (<projectdir>/node_modules/cssdog/lib/casper/regression-test.js:361)
#               at <projectdir>/node_modules/cssdog/lib/casper/regression-test.js:171
#    stack: not provided
FAIL 1 test executed in 0.03s, 0 passed, 1 failed, 0 dubious, 0 skipped.        

Details for the 1 failed test:

In <projectdir>/node_modules/cssdog/lib/casper/regression-test.js:67
  Regression Test
    uncaughtError: ReferenceError: Can't find variable: process
Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file://<projectdir>/node_modules/cssdog/node_modules/casperjs/bin/bootstrap.js. Domains, protocols and ports must match.

info: child process exited with code 1

I'm running cssdog 2.0.0 on nodejs v.012.6.

If you need any further information, feel free to ask.

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.