TDD mode
Full CLI reference for v0.39.1, published . Cloud features may behave differently today.
TDD mode compares screenshots on your machine. Use tests that capture through
a Vizzly client. Local baselines, screenshots, and reports live under
.vizzly/. Add that directory to .gitignore.
Run tests once
npx vizzly tdd run "npm test" --no-openThis runs the tests and leaves the browser closed. Omit --no-open to open
the report. When differences should fail the run, add --fail-on-diff.
After reviewing a change, update the local baseline with a deliberate run:
npx vizzly tdd run "npm test" --no-open --set-baselineThe report is written to .vizzly/report/index.html, with comparison data in .vizzly/report-data.json. Save the report directory as a CI artifact when teammates need to open it later.
Keep the dashboard open
npx vizzly tdd start --opennpx vizzly tdd statusnpx vizzly tdd listnpx vizzly tdd stopRun your tests in another terminal while the server is running. start
prints the dashboard URL. The usual port is 47392; use the URL that start
prints when another port is selected. Pass --port on start to choose a port.
If a running server cannot be reached, check tdd list before starting another one.
Use tdd status --port 47393 or tdd stop --port 47393 to target a specific registered server.
Use an approved cloud baseline
npx vizzly tdd run "npm test" --baseline-build build-id --no-openUse --baseline-comparison for a single comparison. These options need
cloud authentication.
Cloud baseline downloads also bring down dynamic-content metadata for the local comparisons.
Read local results
Use the screenshot commands to inspect captures from the latest local run. They work after the server stops and need no cloud login.
npx vizzly tdd screenshots list --page 1 --page-size 20 --jsonnpx vizzly tdd screenshots list --status failed --jsonnpx vizzly tdd screenshots list --status new --jsonnpx vizzly tdd screenshots show <comparison-id> --image all --jsonnpx vizzly tdd screenshots latest "Dashboard"list shows IDs, browser and viewport variants, and current image paths. Use IDs when names match several variants. If hasNext is true, use the next page with the same page size and filters.
show gives you comparison details and the current image path. Add --image all for baseline and diff paths too. Check each image's exists flag, then open the files. latest [name] prints the newest current image path.
Local failed means the image changed; error means the comparison couldn't run. The report doesn't record the Git commit. If it might be old, rerun your tests.
Once you've reviewed a change, accept one local baseline with:
npx vizzly tdd screenshots accept <comparison-id> --jsonThis updates one local baseline and the saved report. Cloud review decisions are handled separately.
See scripting for cloud API requests and JSON output.