A CLI tool for visual regression testing
Project description
Visual Regression Testing (VRT) CLI Tool
This CLI tool is designed to help with visual regression testing by comparing images from two directories (vrt-expected and vrt-actual). It also provides functionality to approve new baseline images.
Features
- Initialization: Create the necessary directories for storing expected and actual images.
- Comparison: Compare images in the
vrt-expectedandvrt-actualdirectories and generate a difference image if discrepancies are found. - Approval: Approve actual images and move them to the
vrt-expecteddirectory, renaming them as required.
Installation
pip install vrt_python
Usage
1. Initialize Directories
To set up the necessary directories (vrt-expected and vrt-actual), run:
vrt init
This command will create the following directories:
vrt-expected: Where you store your expected baseline images.vrt-actual: Where you store the actual images to compare against the baseline.
2. Compare Images
To compare images between the vrt-expected and vrt-actual directories, run:
vrt compare
This command will:
- Compare each image in
vrt-expectedwith the corresponding image invrt-actual. - Generate a difference image in the
vrt-differencedirectory if discrepancies are found. - Print the percentage of difference for each image.
3. Approve Actual Images
To approve the actual images and move them to the vrt-expected directory, run:
vrt approve
This command will:
- Copy images from the
vrt-actualdirectory to thevrt-expecteddirectory. - Rename the images by replacing the
actual_prefix withexpected_.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Hashes for vrt_python-0.2.0-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | e087a5f37116cf70be4fd6387ab6ba906079dc92fc5bfb3217d13bd4d3f2a9c7 |
|
| MD5 | 0095894c610971e71a468735e03de0c0 |
|
| BLAKE2b-256 | 2cbed0bfaa0f2b88cf0c3d35697e646c2a4de2e034725e344d5fa60cd35bcc7f |