bifroest test
Run offline tests against YAML configuration without starting the service,
authenticating credentials or creating target resources. The current testing
scope is limited; selected is not a complete access grant.
To write a suite, start with Test a configuration. The testing reference describes the Lua API and supported policy behavior separately from this command's invocation.
Syntax
Arguments
suites
One or more suite files or directories. Directories are searched recursively for
*_bftest.lua. File/directory symlinks are followed, including outside the
starting directory; physical inputs are deduplicated and directory cycles
terminate. Sources execute in sorted canonical-path order. --suite is not a flag.
A valid matching Lua file that registers no suite produces a warning on stderr; syntax/runtime/resource failures are errors, even when filters select no tests.
Flags
Includes general executable flags.
--configuration
Fallback YAML file for suites without configuration; relative to the invocation
directory. Otherwise the platform configuration path
is used. This does not override suite YAML. See configuration selection.
--includes
string
Repeatable Go regular expression matched against suite.name/test.name.
Includes are OR-combined; without includes, all names match. Matching is by
substring unless anchored. Invalid expressions and an empty final selection
return 2. Filters choose tests, not which candidate source files are loaded.
--excludes
string
Repeatable name filter using the same syntax. Any matching exclusion wins over includes. Name exclusions are not platform-skipped outcomes.
--verbose
-vbool = false
Show every package, suite and test, including passing and platform-skipped cases. Without it, show failures/errors and per-directory summaries.
--json
Write the JSON report, replacing an existing regular report and creating missing parent directories.
--junit
Write the JUnit XML report, with the same replacement/parent behavior. JSON and JUnit need distinct destinations. Symlinks, nonregular destinations, reserved suite filenames and captured inputs/aliases are protected. Multiple outputs are not an atomic transaction.
Output
Text goes to stdout; warnings and operational diagnostics go to stderr. The
final RESULT counts tests, not assertions. Physical source directories form
packages, including for single-file runs. See reports
for package ordering, verbose output, timings and skip/error representation.
Exit codes
| Code | Meaning |
|---|---|
0 |
At least one test selected; all selected tests passed without loading errors. |
1 |
At least one assertion failed. |
2 |
No tests found/selected, invalid input/regex, unsupported or unmodeled dependency, policy/runtime/resource/report failure. |
Code 2 takes precedence over 1. A report failure retains its destination and original cause, even after text has been printed. Completed result reports do not cause a redundant generic executable error log.
Examples
Test your configuration and publish CI reports
1 2 3 4 | |
Select cases across directories
1 2 3 4 5 6 | |
Run the repository examples
From a checkout, with its current binary:
1 | |
Without the exclusion, the deliberate failure returns 1. See the example catalogue for individual directories.
Availability
linux |
darwin |
windows |
|---|---|---|
| / | / | / |
Invocation modes
| Local CLI | @target |
Direct SSH |
|---|---|---|
The CLI uses its own OS/architecture/version metadata for platform selectors. There are no platform override flags. It also runs in the regular Bifröst image; see the container example.