Run Rego tests
rego_testRun Rego unit tests with aggregate pass/fail counts and per-test details. Supports optional verbose output, coverage, and regex test filtering.
Instructions
Run Rego unit tests with opa test. Returns aggregate pass/fail counts plus per-test records. Tests live in *_test.rego files; rule names beginning with test_ are picked up.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Test directories or files. `opa test` looks for `*_test.rego` siblings of source files. | |
| verbose | No | Emit per-test pass/fail details. | |
| coverage | No | Include per-line coverage data in the output. | |
| runPattern | No | Run only tests whose names match this regex. |