Run integration tests for your Visor config using the built-in test subcommand.
- Discover tests file and list cases
visor test --list [--config defaults/visor.tests.yaml]
- Run cases
visor test [--config defaults/visor.tests.yaml] [--only <substring>] [--bail]
- Validate tests YAML without running
visor test --validate [--config defaults/visor.tests.yaml]
When no --config is provided, the test runner searches for test files in the following order:
defaults/visor.tests.yamlordefaults/visor.tests.yml.visor.tests.yamlor.visor.tests.ymlin the project root
You can also pass a directory or glob pattern as a positional argument to discover multiple test suites:
visor test defaults/ # Run all suites in defaults/
visor test "**/*.tests.yaml" # Run all matching suites--config <path>: Path to.visor.tests.yaml(auto-discovers if not specified).--only <filter>: Run cases whosenamecontains the substring (case-insensitive).- Stage filter: append
#<stage>to run only a flow stage.- Examples:
--only pr-review-e2e-flow#facts-invalid,--only pr-review-e2e-flow#3(1-based index)
- Examples:
- Stage filter: append
--bail: Stop on first failure.--list: List discovered test cases without running them.--validate: Validate tests YAML syntax without running.
--max-parallel <N>: Run up to N test cases concurrently within a suite (default: 1).--max-suites <N>: Run up to N test suites concurrently when discovering multiple files (default: number of CPUs).
--json <path|->: Write a minimal JSON summary (-for stdout).--report junit:<path>: Write a JUnit XML report.--summary md:<path>: Write a Markdown summary.--progress compact|detailed: Progress verbosity (default: compact).--prompt-max-chars <N>: Truncate captured prompt text to N characters.
--debug: Enable debug mode for verbose output (equivalent toVISOR_DEBUG=true).--no-mocks: Run tests without mock injection. Real providers execute and outputs are printed as suggested mocks.
- Per-case PASS/FAIL lines
- Coverage table (expected vs actual step runs)
- Summary totals (Jest-style format)
- Use
--validatewhen iterating on tests to catch typos early. - Keep
strict: trueintests.defaultsto surface missingexpectquickly. - For large suites, increase
--max-parallelto improve throughput. - Use
--no-mocksto capture real provider outputs, then copy the suggested mocks into your test case. - Enable debug logs with
--debugorVISOR_DEBUG=true:visor test --debug --config defaults/visor.tests.yaml --only pr-review-e2e-flow#facts-invalid
- Getting Started - Introduction to the test framework
- DSL Reference - Complete test YAML schema
- Assertions - Available assertion types
- Fixtures and Mocks - Managing test data
- Flows - Multi-stage test flows
- CI Integration - Running tests in CI pipelines
- Troubleshooting - Common issues and solutions