opa test

Execute Rego test cases

Options

NameDescription
--benchBenchmark the unit tests
--benchmemReport memory allocations with benchmark results
--bundle, -bLoad paths as bundle files or root directories
--count <count>Number of times to repeat each test
--coverage, -cReport coverage (overrides debug tracing)
--exit-zero-on-skipped, -zSkipped 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, -lShow 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, -vSet verbose reporting mode
--help, -hHelp for test