Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.65 KB

README.md

File metadata and controls

37 lines (30 loc) · 1.65 KB

ScreenSpook

ScreenSpook is a showcase application that demonstrates how screenshot-based regression testing can be implemented using CasperJS and PhantomJS.

What's it about?

Taking screenshots at relevant steps during navigation actions through a webapp and sending them to the ScreenSpook server, which will respond whether the screenshot of the same interaction has been manually accepted before. The ScreenSpook server comes with a web interface allowing the user to approve new screenshots.

Prerequisites

  • CouchDB
  • node.js
  • PhantomJS
  • CasperJS

Components

The showcase consists of the following components:

  • A CasperJS module that supplies the method assertScreenshotAccepted(screenshotId[, area]) (the area parameter is passed to casper.captureBase64)
  • An example application (a copy of Localtodos)
  • A node.js server

Deploying and running the showcase

  • Make sure CasperJS is working, which involves installing PhantomJS
  • Install node.js and CouchDB
  • run curl -X PUT http://localhost:5984/screenspook to create a ScreenSpook database
  • run cd example-app-todos && npm install && node app.js to download required NPM modules and run the server with the example app (runs at http://localhost:8080)
  • run cd server && npm install && node app.js to download required NPM modules and run the ScreenSpook server
  • open http://localhost:3000 to see the screenspook site
  • run cd casperjs && casperjs example-todos.js to see the first tests fail