Coder Social home page Coder Social logo

electric-huxley's Introduction

electric-huxley

This project takes screenshots of your webpages so you can check for changes and regressions.

It's likely not ready for production use yet, but pull requests are very welcome.

It aims to complement node-huxley. It aims to have the same API, but makes different trade-offs:

  • it's really fast (a pull request with benchmarks is welcome)
  • it only supports a single target (electron, which renders like Chrome)
  • it only supports static pages (i.e., without JavaScript). If your goal is to test CSS components, or server rendered React components, this may suit your needs.
  • it expects all pages to have the same <head>

electric-huxley hasn't implemented all of node-huxley's APIs yet though. Right now electric-huxley only supports:

  • writeScreenshots with records that are composed of exactly one action: a screenshot
  • compareScreenshots with the same restriction

Pull requests are welcome.

Since this project has a similar API to node-huxley, you can use this project while developing, and then swap this project out for node-huxley to check for pesky cross-platform issues.

Getting started

You will likely want to run electric-huxley in a virtual machine so that you can get consistent renders across physical machines. I use vagrant and VirtualBox, but you can use whatever you prefer.

You'll need node, gtk, gconf, nss, grunt, and imagemagick. On Linux, you also need an X server. xvfb should suit your needs, but you may instead use a physical X server if you would like.

sudo apt-get install -y nodejs npm gtk2.0 libgconf2.0 libnss3 imagemagick xvfb
npm install -g grunt-cli

Next, add electric-huxley to your package.json:

npm install --save-dev jnetterf/electric-huxley

Consult node-huxley's documentation for usage, keeping in mind the above mentioned limitations.

electric-huxley's People

Contributors

dmnd avatar jocelyn-stericker avatar slexaxton avatar

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.