cargo-nextest_skill

This skill helps Rust projects run tests faster and more reliably by isolating tests in separate processes with flexible filtering.
  • Shell

7

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill laurigates/claude-plugins --skill cargo-nextest

  • SKILL.md7.6 KB

Overview

This skill integrates cargo-nextest, a next-generation Rust test runner, into development and CI workflows. It helps run tests in isolated processes with parallel execution, advanced filtering, retries for flaky tests, and multiple output formats. Use it to speed up test runs, improve isolation, and generate CI-friendly reports like JUnit XML. The skill focuses on practical commands, configuration patterns, and CI integration examples.

How this skill works

The skill invokes cargo nextest commands and reads .config/nextest.toml profiles to control retries, threads, timeouts, and output formats. It builds test expressions to filter by test name, package, binary, kind, or platform and passes them to cargo nextest run -E. It also offers guidance for parallelism, resource grouping, and producing JSON or JUnit output for programmatic consumption or CI pipelines.

When to use it

  • Running Rust test suites with better isolation and parallelism than cargo test
  • Configuring CI pipelines to produce JUnit or JSON test reports
  • Filtering large test collections to run specific tests or test kinds
  • Managing flaky tests with automatic retries and retry statistics
  • Optimizing test performance by tuning test-threads and test groups

Best practices

  • Define profiles (default, ci, coverage) in .config/nextest.toml for environment-specific behavior
  • Use expression filters (-E) to run small focused subsets during development
  • Set retries and overrides for known flaky tests instead of ignoring failures
  • Group resource-heavy tests with test-groups to serialize access to shared resources
  • Produce JUnit XML in CI (profile ci) and upload the artifact for test reporting

Example use cases

  • Run all tests locally with maximum parallelism: cargo nextest run --test-threads 0
  • Run only authentication tests: cargo nextest run -E 'test(auth)'
  • CI job that installs nextest, runs tests with profile ci, and uploads target/nextest/ci/junit.xml
  • Retry flaky tests twice in CI by setting retries = 2 in the ci profile
  • Serialize database integration tests by creating a test-group with max-threads = 1

FAQ

No. nextest does not support doctests. Run doctests separately using cargo test --doc.

How do I limit parallelism to debug a failing test?

Set --test-threads 1 to run tests serially or specify a small number to reduce concurrency.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational