Giter Site home page Giter Site logo

davidsayre / wraith Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bbc/wraith

0.0 1.0 0.0 5.88 MB

Wraith — A responsive screenshot comparison tool

Home Page: http://bbc-news.github.io/wraith/index.html

License: Apache License 2.0

Ruby 69.90% HTML 11.78% JavaScript 18.32%

wraith's Introduction

Wraith is a screenshot comparison tool, created by developers at BBC News.
DocumentationSourceResponsive News Website

What is it?

Wraith uses a headless browser to create screenshots of webpages on different environments (or at different moments in time) and then creates a diff of the two images; the affected areas are highlighted in blue.

Photo of BBC News with a diff

Documentation

For instructions on how to install, set up and use Wraith and all of its features, visit the Wraith documentation.

A brief overview of how Wraith works is provided below.

Wraith modes

There are several ways in which Wraith can be used:

  1. Comparison of 2 domains (wraith capture). There are also some specialist options within this mode:
    • Spidering 2 domains for changes (wraith capture when no paths property is provided in the configuration file)
    • Running several comparisons at once (wraith multi_capture)
  2. Comparing the same domain over time (wraith history, then wraith latest)

Whichever mode you decide to run Wraith in, the process it follows is generally the same:

  • takes screenshots of your webpages
  • runs a comparison task across them
  • outputs a diff PNG file comparing the two images, and a data.txt file which contains the percentage of pixels that have changed
  • packages all of this up into a gallery.html, ready for you to view
  • if any screenshot's diff is above the threshold you specified in your configuration file, the task exits with a system error code (useful for CI)
  • the failed screenshot will also be highlighted in the gallery

Requirements

ImageMagick is required to compare the screenshots.

Wraith also requires at least one of these headless browsers:

Contributing

Please read how to contribute to Wraith.

License

Wraith is available to everyone under the terms of the Apache 2.0 open source license. Take a look at Wraith's LICENSE file.

Credits

Selenium-Wraith

Anyone interested in integrating selenium capability with Wraith should check out Selenium-Wraith (by Andrew Tekle-Cadman of Future Visible), which was forked from BBC's Wraith on 16/04/14 and adds the following capabilities:

  1. Selenium integration, both running locally on a desktop or on a selenium grid
  2. Browser to browser screenshot comparison
  3. Page component-based comparison

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.