Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cargo-nextest

$ cargo-nextest Community Low Risk
nextest-rs · Code & DevOps · Apache-2.0 OR MIT · macos / linux / windows

cargo-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.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install cargo-nextest
CLI vs MCP Decision CLI Only

Local Rust test runner integrated with cargo and workspace targets; agents invoke cargo nextest directly.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

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 json for test discovery
  • Experimental JSON test-run output gated behind NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1
Trust & Safety 22 / 25

Per-test process isolation prevents state pollution across tests; runs locally with zero credential exposure.

  • Process-per-test isolation limits crash blast radius
Setup & Portability 13 / 15

Prebuilt binaries via Homebrew, cargo-binstall, and GitHub releases across macOS, Linux, and Windows, requiring a Rust toolchain.

  • Available via brew install cargo-nextest and cargo install
Utility & Efficiency 14 / 15

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
Maintenance & Lineage 9 / 10

Actively maintained by nextest-rs with strong adoption across the Rust ecosystem.

  • Standard alternative test runner in Rust CI
Docs & Verifiability 8 / 10

Detailed documentation at nexte.st and thorough --help pages for every subcommand.

  • Structured online docs and filterset reference

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; runs local Cargo workspace test binaries.

Side Effects
Read-Only Local Write
Cost & Quotas

Dual-licensed Apache-2.0 / MIT open-source tool; free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List all workspace tests as JSON
cargo nextest list --message-format json --color never

Enumerates all test binaries and test cases in structured JSON without executing tests.

Run filtered tests with non-color output
cargo nextest run --color never -E 'test(parser)'

Executes only matching tests using nextest filterset syntax (-E) with clean output.

Controlled Writes & Previews

Run tests and emit JUnit XML via CI profile
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 json and -E filtersets 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 into NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1.
  • ! Does not execute Rust doctests; pair with cargo test --doc when doctest coverage is required.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI