Skip to content
v0.35.1

TDD mode

Full CLI reference for v0.35.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

Terminal window
npx vizzly tdd run "npm test" --no-open

This 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:

Terminal window
npx vizzly tdd run "npm test" --no-open --set-baseline

Comparison data is saved in .vizzly/report-data.json. When the command prints a static report path, save that report directory as a CI artifact. If a run ends without producing an HTML report, use tdd start --open and rerun the tests against its live dashboard.

Keep the dashboard open

Terminal window
npx vizzly tdd start --open
npx vizzly tdd status
npx vizzly tdd list
npx vizzly tdd stop

Run 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

Terminal window
npx vizzly tdd run "npm test" --baseline-build build-id --no-open

Use --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

Read the saved local results with the context command available in this release:

Terminal window
npx vizzly context build current --source local --json

See scripting for cloud API requests and JSON output.