cargo-nextest
$ cargo-nextest Community Low Riskcargo-nextest executes each Rust test in its own isolated process for speed and resilience against segfaults or global state leaks. It offers structured test discovery via cargo nextest list --message-format json, experimental libtest-json run output, and JUnit XML reporting.
brew install cargo-nextest Local Rust test runner integrated with cargo and workspace targets; agents invoke cargo nextest directly.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports list --message-format json, rich -E filtersets, and --color never, though run --message-format libtest-json still requires NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1.
cargo nextest list --message-format jsonfor test discovery- Experimental JSON test-run output gated behind
NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1
Per-test process isolation prevents state pollution across tests; runs locally with zero credential exposure.
- Process-per-test isolation limits crash blast radius
Prebuilt binaries via Homebrew, cargo-binstall, and GitHub releases across macOS, Linux, and Windows, requiring a Rust toolchain.
- Available via
brew install cargo-nextestandcargo install
Significantly faster than cargo test on large workspaces, with retries, slow-test warnings, and filterset expressions.
- Parallel per-test scheduling and built-in retry/JUnit support
Actively maintained by nextest-rs with strong adoption across the Rust ecosystem.
- Standard alternative test runner in Rust CI
Detailed documentation at nexte.st and thorough --help pages for every subcommand.
- Structured online docs and filterset reference
Security, Auth & Guardrails
No credentials required; runs local Cargo workspace test binaries.
Dual-licensed Apache-2.0 / MIT open-source tool; free.
# cargo-nextest Agent Rules - Use `cargo nextest list --message-format json` to inspect test names before filtering with `-E`. - Pass `--color never` and `--no-fail-fast` when collecting full failure diagnostics. - Remember that `cargo nextest` does not run Rust doctests (`cargo test --doc` is separate).
Agent-Ready Command Recipes
Safe Read-Only Queries
cargo nextest list --message-format json --color never
Enumerates all test binaries and test cases in structured JSON without executing tests.
cargo nextest run --color never -E 'test(parser)'
Executes only matching tests using nextest filterset syntax (-E) with clean output.
Controlled Writes & Previews
cargo nextest run --profile ci --color never
Runs tests using the workspace .config/nextest.toml CI profile to write JUnit XML artifacts.
Strengths for Agents
- + Runs every test in an isolated subprocess, catching aborts and timeouts cleanly.
- +
cargo nextest list --message-format jsonand-Efiltersets enable targeted test execution. - + Native JUnit XML and retry configuration via
.config/nextest.toml.
Caveats & Pitfalls
- ! Structured JSON output during
run(--message-format libtest-json) still requires opting intoNEXTEST_EXPERIMENTAL_LIBTEST_JSON=1. - ! Does not execute Rust doctests; pair with
cargo test --docwhen doctest coverage is required.