Skip to main content

Automate chrome browser render diffs for website testing

Project description

Featuring Puppeteer, headless Chrome and Python image diffing

Installation

pip install visualdiff

Usage

Create your tests calling visualdiff.compare(url), this will drive a headless Chrome session rendering the desired URL and comparing the resulting image with an expected one.

The expectation are stored by default in a visualdiff subfolder of the current calling test script.

There are several additional options you can use, we’ll see them in the examples

Examples

import visualdiff as vd

assert not vd.difference('https://example.com')

Credits:

History

0.3.0 (2018-05-12)

  • Disable CSS animation, allow screenshot delay

  • If save_differences==True the diff file will contain an highlighted diff-rect

0.2.3 (2018-04-11)

  • First version in Continuous Integration

0.2.0 (2018-04-06)

  • Beta version, things should work

0.1.0 (2018-02-18)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visualdiff-0.3.4.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

visualdiff-0.3.4-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file visualdiff-0.3.4.tar.gz.

File metadata

  • Download URL: visualdiff-0.3.4.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for visualdiff-0.3.4.tar.gz
Algorithm Hash digest
SHA256 3b8d4dd74bdfc9187a1b817c967adf46b376b042ee71c8a69e204b4b09669d83
MD5 7d7cd9f4e0b5b5b16737e8ce4dd9adb8
BLAKE2b-256 e2766020c8255357848f2887c673c68b7ebf462f46d984a52e04323738bcc7ea

See more details on using hashes here.

File details

Details for the file visualdiff-0.3.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for visualdiff-0.3.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ab78d8672c0650d6c67c514c72ef2a40beab73a7358e9dbec5d85493132e562f
MD5 d7ca1a3c6d0f318cddabdce374c43e95
BLAKE2b-256 3d807018f6d0df8c8f865cf049fb2162bff6c3a6970954a62a1a854d60c977c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page