A simple showcase for screenshot-based regression testing with CasperJS
Find a file
2012-07-05 18:22:04 +03:00
casperjs initial import 2012-07-04 16:19:52 +02:00
example-app-todos initial import 2012-07-04 16:19:52 +02:00
server initial import 2012-07-04 16:19:52 +02:00
README.md Update master 2012-07-05 18:22:04 +03:00

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