Open source, self hosted solution for visual testing and managing results of visual testing.
Project description
Python SDK for Visual Regression Tracker
Install
pip install visual_regression_tracker
Usage
Import
from visual_regression_tracker import VisualRegressionTracker, Config, TestRun
Configure connection
config = Config(
# apiUrl - URL where backend is running
apiUrl='http://localhost:4200',
# project - Project name or ID
project='Default project',
# apiKey - User apiKey
apiKey='tXZVHX0EA4YQM1MGDD',
# branch - Current git branch
branchName='develop',
# enableSoftAssert - Log errors instead of exceptions
enableSoftAssert=False,
)
vrt = VisualRegressionTracker(config)
Setup / Teardown
As context manager:
with vrt:
...
# track test runs
...
Without context manager:
vrt.start()
...
# track test runs
...
vrt.stop()
Assert
vrt.track(TestRun(
# Name to be displayed
# Required
name='Image name',
# Base64 encoded string
# Required
imageBase64=image,
# Allowed mismatch tollerance in %
# Optional
# Default: 0%
diffTollerancePercent=1,
# Optional
os='Mac',
# Optional
browser='Chrome',
# Optional
viewport='800x600',
# Optional
device='PC',
# Array of areas to be ignored
ignoreAreas=[
IgnoreArea(
# X-coordinate relative of left upper corner
# Required
x=10,
# Y-coordinate relative of left upper corner
# Required
y=20,
# Area width in px
# Required
width=300,
# Height width in px
# Required
height=400
)
],
))
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file visual_regression_tracker-4.4.0.tar.gz
.
File metadata
- Download URL: visual_regression_tracker-4.4.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96786672a7a5a7e64be1732dc2fe8bc91c2d91fb49ff22dd731a707a97bb6b42 |
|
MD5 | 91b83b7122353021b95b5dfff201a995 |
|
BLAKE2b-256 | 89c70e81209bb48a7bca682a27a2d1284617371b33444bf28485c3863462d95b |
Provenance
File details
Details for the file visual_regression_tracker-4.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: visual_regression_tracker-4.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cb8f97a8d95d4eabbac986be82f84b642ccebcb441470447efcd73e2472728b |
|
MD5 | b3bcb891ea99a9c65ecdfd8f956f761b |
|
BLAKE2b-256 | 421dca0730bcf610d709123cf7278dbb47047b4a65acf2bde38a22703d4cc958 |