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',
# ciBuildId - Current git commit SHA
ciBuildId='commit_sha',
# 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
Close
Hashes for visual_regression_tracker-4.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1decf893558a7b776dcea4e068819914eb406ffec6f59596a3d08c226998515 |
|
MD5 | 36265af2653b355ebb6e4e578eb1a4ff |
|
BLAKE2b-256 | 6f016a76fef835727764cf7472e321fd8d1927bb95a1e2ff816196c03b48dcb2 |
Close
Hashes for visual_regression_tracker-4.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c2ecbb5cb09d4b981001075fe3348a6e09738206f71b84c33dab5d0e5aed41 |
|
MD5 | 26415d9133f076e1b118148cf0f906bc |
|
BLAKE2b-256 | fce33450a0b3b956ebcf8e02b1a77bec54b321862909db4f123cb6bfe035fa7d |