Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

Synopsis

cargo ninety-nine [OPTIONS] <COMMAND>

Global Options

OptionDefaultDescription
--project-dir <PATH>.Project root directory
--output <FORMAT>consoleOutput format: console or json
-N, --non-interactivefalseDisable TUI, use plain text output
-v, --verbosefalseEnable verbose output

By default, test, status, and history launch an interactive TUI. Use -N for CI pipelines, scripts, or piped output.


Commands

diagnose

Multi-phase stress → isolation → classify pipeline. See Multi-phase Diagnose.

cargo ninety-nine diagnose [OPTIONS] [FILTER_EXPR]
ArgumentDefaultDescription
[FILTER_EXPR]noneFilter expression (same DSL as test)
--stress-runs <N>config (3)Full-binary multi-threaded suite runs
--isolation-runs <N>config (10)Serial --exact runs per candidate
--recordfalseAttempt rr recording for Intrinsic failures
--no-recordfalseDisable recording even if config enables it
--record-dir <PATH>configDirectory for rr traces
--confidence <F>configBayesian confidence threshold

test

Run tests and detect flakiness. Each discovered test is executed multiple times, scored with Bayesian inference, and results are stored for trend analysis.

cargo ninety-nine test [OPTIONS] [FILTER_EXPR]
Argument/OptionDefaultDescription
[FILTER_EXPR]noneFilter expression (DSL or test name pattern)
-n, --iterations <N>from config (min_runs, default 10)Number of times to run each test
--confidence <FLOAT>from config (confidence_threshold, default 0.95)Confidence threshold for flaky classification

Examples:

# Run all tests 10 times each (defaults)
cargo ninety-nine test

# Run tests matching a substring
cargo ninety-nine test my_module

# Run with more iterations and stricter confidence
cargo ninety-nine test -n 25 --confidence 0.99

# Use filter DSL to run only flaky tests
cargo ninety-nine test "flaky"

# Combine filter predicates
cargo ninety-nine test "test(my_module) & !quarantined"

Filter DSL

The optional FILTER_EXPR argument accepts a domain-specific language for filtering tests. If the expression contains no DSL operators, it is treated as a plain test name substring filter.

Predicates:

PredicateDescription
test(pattern)Match test names by regex pattern
package(name)Match tests in a package (substring match)
binary(name)Match tests from a specific binary (substring match)
kind(type)Match by binary kind: lib, bin, test, example
flakyMatch tests previously detected as flaky
quarantinedMatch quarantined tests
allMatch all tests
bare_wordTreated as test(bare_word) regex pattern

Operators:

OperatorMeaning
&AND – both sides must match
|OR – either side must match
!NOT – negate the following expression
( )Grouping

Examples:

# Tests matching a regex
cargo ninety-nine test "test(my_module::.*)"

# Flaky tests that are not quarantined
cargo ninety-nine test "flaky & !quarantined"

# Tests in a specific package or binary kind
cargo ninety-nine test "package(my_crate) | kind(test)"

# Complex expression with grouping
cargo ninety-nine test "(flaky | test(slow)) & !quarantined"

init

Initialize a .ninety-nine.toml configuration file in the project root.

cargo ninety-nine init [OPTIONS]
OptionDescription
--forceOverwrite existing config file

status

Show flakiness status for tests. Without a test name, launches the interactive TUI (or prints a table with -N).

cargo ninety-nine status [TEST_NAME]
ArgumentDescription
[TEST_NAME]Show detailed status for a specific test. Omit to browse all scores interactively.

When a test name is provided, shows: category, P(flaky), pass rate, total runs, consecutive failures, credible interval, trend direction, failure patterns, and recent run history.


history

Show detection session history. Launches the interactive TUI by default (or prints a table with -N).

cargo ninety-nine history [OPTIONS] [FILTER]
Argument/OptionDefaultDescription
[FILTER]noneFilter by test name
-n, --limit <N>20Maximum sessions to show

export

Export flakiness data to a file.

cargo ninety-nine export <FORMAT> <PATH>
ArgumentValuesDescription
<FORMAT>junit, html, csv, jsonExport format
<PATH>file pathOutput file path

quarantine

Manage test quarantine.

quarantine list

cargo ninety-nine quarantine list

Lists all quarantined tests with their quarantine date, reason, flakiness score, and whether they were auto-quarantined.

quarantine add

cargo ninety-nine quarantine add <TEST_NAME> [OPTIONS]
OptionDefaultDescription
--reason <TEXT>"manually quarantined"Reason for quarantine

quarantine remove

cargo ninety-nine quarantine remove <TEST_NAME>

ci

CI integration helpers.

ci generate

Generate a CI workflow file for flaky test detection.

cargo ninety-nine ci generate <PROVIDER> [PATH]
ArgumentValuesDescription
<PROVIDER>github, gitlabCI provider
[PATH]file pathOutput file path (default: stdout)