mutation-testing

Run cargo-mutants mutation testing on Rust workspaces and triage surviving mutants.

58|4|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/po4yka/RIPDPI --skill mutation-testing-po4yka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mutation-testing
Source: https://github.com/po4yka/RIPDPI/tree/main/.github/skills/mutation-testing
Command: npx skills add https://github.com/po4yka/RIPDPI --skill mutation-testing-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mutation testing reveals gaps in Rust test suites by injecting small semantic changes (mutants) and evaluating whether tests fail, enabling targeted improvements to test adequacy.

Core Features & Use Cases

  • Cargo-mutants integration: run mutation testing across Rust workspaces to measure test adequacy.
  • Survived-mutant triage: identify mutants that survived and prioritize test improvements.
  • Incremental and targeted runs: support per-package or diff-based mutation analysis to speed feedback and focus on changed code.

Quick Start

Run mutation testing on your Rust workspace using cargo-mutants and triage surviving mutants to tighten your tests.

Frequently Asked Questions about mutation-testing

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

FAQPage Schema
How does mutation testing improve my Rust test suite?

Mutation testing improves Rust test suites by introducing semantic mutants into the code and checking if tests fail. Surviving mutants reveal test adequacy gaps, enabling targeted improvements to your test coverage.

Can I run cargo-mutants on a specific package instead of the full workspace?

Yes, you can run cargo-mutants on a specific package or use incremental diff-based analysis. This targeted mutation testing speeds up feedback and focuses triage on changed code rather than the full workspace.

How do I triage surviving mutants in a Rust project?

You triage surviving mutants by reading structured results from target/mutants-output. This output identifies which semantic mutants bypassed your tests, guiding you to prioritize and write the specific test improvements needed.

Does this mutation testing workflow require any specific configuration files?

Yes, the workflow reads mutants.toml for configuration. This file configures how cargo-mutants operates across your Rust workspace, ensuring the semantic mutants are introduced and evaluated according to your project settings.

What is the best way to measure test adequacy in Rust?

Measuring test adequacy in Rust is best done by injecting small semantic changes and evaluating test failures. This approach reveals whether your tests actually catch logic errors, providing a deeper assessment than line coverage.

Why do my Rust tests pass even when logic is changed?

Tests pass despite logic changes because of test adequacy gaps, where surviving mutants indicate missing assertions. Running mutation testing identifies these exact weaknesses so you can add the necessary test cases.