nextest-scripts

Configure cargo-nextest wrapper and setup scripts via TOML for test instrumentation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/fasterthanlime/.claude --skill nextest-scripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextest-scripts
Source: https://github.com/fasterthanlime/.claude/tree/main/skills/nextest-scripts
Command: npx skills add https://github.com/fasterthanlime/.claude --skill nextest-scripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill configures cargo nextest with wrapper scripts (for valgrind, resource limits, profiling) and setup scripts (fixtures, services) to streamline test instrumentation and environment prep.

Core Features & Use Cases

  • Wrapper Scripts: wrap test binaries for instrumentation, resource limits, or debugging.
  • Setup Scripts: run pre-test services, fixtures, and environment preparation steps.
  • Profile Configurations: define default and CI-specific profiles to automate test runs.

Quick Start

Create a project-level .config/nextest.toml and configure wrappers and setups per the examples, then run: cargo nextest run --profile instrumented -p <pkg> test_name

Frequently Asked Questions about nextest-scripts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up cargo nextest with wrapper scripts for profiling and instrumentation?

Create a `.config/nextest.toml` file in your project and define wrapper commands (valgrind, heaptrack, perf, lldb, or custom tools) that wrap test binaries. Configure profiles to apply these wrappers to specific test runs using `cargo nextest run --profile <profile-name>`, enabling memory profiling, tracing, and resource limit instrumentation across Linux, macOS, and Windows.

Can I automate test environment setup with fixtures and services before running tests?

Yes, setup scripts in nextest configuration run pre-test preparation steps including fixture creation, service startup, and environment initialization. Define these in your profile configuration to execute automatically before test execution, streamlining environment prep across different CI and local contexts.

Does nextest support platform-specific wrappers and environment variables across different operating systems?

Nextest wrapper infrastructure supports platform filters in TOML configurations, allowing you to define OS-specific wrapper commands and setup scripts for Linux, macOS, and Windows. Environment variables propagate to tests, enabling controlled cross-platform test execution with tailored instrumentation per platform.

How do I configure different test profiles for CI versus local development with nextest?

Define multiple profiles in `.config/nextest.toml` with distinct wrapper and setup configurations for each context. Use profile-based run and list wrappers to activate different instrumentation, resource limits, or environment setups when running `cargo nextest run --profile <profile-name>`, automating CI-specific versus development-specific test execution.

What wrappers are supported for test instrumentation and resource control?

Supported wrappers include valgrind for memory checking, heaptrack for heap profiling, strace for system call tracing, perf for performance profiling, and lldb for debugging, plus custom wrapper commands. Each wraps test binaries to enable controlled instrumentation, resource limits, or debugging across your test suite.

Can I use nextest wrapper scripts in projects that need memory profiling and resource limits?

Yes, nextest-scripts is designed for projects requiring memory profiling, tracing, resource limits, or custom test environments. TOML-based configurations attach wrappers like valgrind and heaptrack and define setup steps, satisfying functional requirements for instrumented test runs with controlled resource allocation.