This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

dfrnt is a library for comparing PNG screenshots during automated testing and producing visual diffs.

dfrnt will compare images with identical names from automation and produce a result “diff” image that red-highlights regions in the image that differ.

dfrnt requires a minimum of 3 folders to be specified:

run_dir is the directory of screenshots from your run, aka ‘actual screenshots’ gold_dir directory of screenshots that are compared against, aka ‘expected screenshots’ diff_dir is the directory to output the visual diff images into

Invoking:

  1. You have a directory of images from your latest test run in “test/run” (test.png)
  2. You have a directory of the expected images in “test/gold” (test.png)
  3. You want the output of visual diffs to be placed in directory “test/diff”

from dfrnt import dfrnt

visual_diffs = dfrnt(run_dir=”test/run”, gold_dir=”test/gold”, diff_dir=”test/diff”)

visual_diffs.diff()

Output: Diff failed! test.png is not identical enough

A red-lined image showing the differences between run/test.png and gold/test.png is generated in diff/test.png

Optional Features: mask_dir is the directory to contain images with highlighted areas you wish to ignore in the diff. This is useful for ignoring portions of an image that always change, like date / time. These mask images should be transparent background PNGs

fuzzy is a “fuzziness” factor of how different images can be and still pass. If you experience jitter you should experimentally determine the lowest acceptable number you can use. Default is None, starting your binary search around ‘40’ is recommended

visual_diffs = visual_diffs = dfrnt(run_dir=”run”, gold_dir=”gold”, diff_dir=”diff”, mask_dir=”mask”, fuzzy=40)

Why is this project called ‘dfrnt’? To mock the modern practice of dropping vowels in software names to sound unique. Be glad I didn’t name it dfrntzlyr.

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dfrnt-0.2.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Nov 18, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting