opa test
Execute Rego test cases
Options
Name | Description |
---|---|
--bench | Benchmark the unit tests |
--benchmem | Report memory allocations with benchmark results |
--bundle, -b | Load paths as bundle files or root directories |
--count <count> | Number of times to repeat each test |
--coverage, -c | Report coverage (overrides debug tracing) |
--exit-zero-on-skipped, -z | Skipped tests return status 0 |
--explain <explain> | Enable query explanations |
--format, -f <format> | Set output format |
--ignore <ignore> | Set file and directory names to ignore during loading (e.g., '.*' excludes hidden files) |
--max-errors, -m <max-errors> | Set the number of errors to allow before compilation fails early |
--run, -r <run> | Run only test cases matching the regular expression |
--show-failure-line, -l | Show test failure line |
--target, -t <target> | Set the runtime to exercise |
--threshold <threshold> | Set coverage threshold and exit with non-zero status if coverage is less than threshold % |
--timeout <timeout> | Set test timeout (default 5s, 30s when benchmarking) |
--verbose, -v | Set verbose reporting mode |
--help, -h | Help for test |