Run VRT from the CLI
Visual regression testing (VRT) captures screenshots of your routes and
compares them against an approved baseline. The yofix vrt commands let
you trigger a run, see what changed, and approve or reject the changes from
your terminal. For the concept, see Visual regression.
Trigger a run
A VRT run compares a ready deployment against the baseline:
yofix vrt run --deployment dpl_4f2a9cOmit --deployment to run against the most recent ready deployment for the
linked project.
See what changed
List recent runs, then summarize the diffs in one:
yofix vrt listyofix vrt list --status completed --branch main --limit 10yofix vrt diff run_8a31vrt diff prints one row per changed screenshot with its route, viewport,
and diff percentage, so you can tell a real regression from noise before
opening a single image.
Approve or reject
When a change is intentional, approve it to make it the new baseline:
yofix vrt approve run_8a31 --all # approve every pending screenshotyofix vrt approve run_8a31 --screenshot scr_77When a change is a regression, reject it (this does not touch the baseline):
yofix vrt reject run_8a31 --screenshot scr_77 --reason "Nav overlaps logo"Re-run, cancel, and logs
yofix vrt rerun run_8a31 # same commit, same branchesyofix vrt cancel run_8a31 # stop a running or pending runyofix vrt logs run_8a31 # pipeline logs for the runyofix vrt logs run_8a31 --raw # raw log text instead of rowsConfigure what gets tested
Routes and viewports define the test matrix:
yofix routes listyofix routes set /pricing --threshold 0.1yofix routes set /dashboard --auth # route requires authentication
yofix viewports listyofix viewports set 1440x900 --name desktopyofix viewports set 390x844 --name mobileSee Domains, environments and VRT config for the full reference.