TestAgent provides a powerful command-line interface for testing.
Test any output with AI:
Options:
| Option | Short | Description |
|--------|-------|-------------|
| --criteria | -c | Criteria to evaluate against |
--criteria
-c
| --expected | -e | Expected output for accuracy |
--expected
-e
| --threshold | -t | Score threshold (default: 7.0) |
--threshold
-t
| --model | -m | LLM model to use |
--model
-m
| --verbose | -v | Verbose output |
--verbose
-v
| --json | | Output as JSON |
--json
Test output accuracy:
Test against custom criteria:
Run AI tests with pytest-like options:
| --pattern | -p | File pattern (e.g., 'test_*.py') |
--pattern
-p
| --durations | | Show N slowest tests |
--durations
| --durations-min | | Minimum duration to show |
--durations-min
| --exitfirst | -x | Exit on first failure |
--exitfirst
-x
Discover tests without running:
Clear the test cache:
Show cache statistics:
Show version:
| Code | Meaning |
|------|---------|
| 0 | All tests passed |
| 1 | Some tests failed |
| 2 | Error occurred |
| 5 | No tests collected |