testing

Guides test design around seams, oracles, and discriminating inputs, with mutation testing via harden.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/MaxWolf-01/agents --skill testing-maxwolf-01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/MaxWolf-01/agents/tree/main/mx/skills/testing
Command: npx skills add https://github.com/MaxWolf-01/agents --skill testing-maxwolf-01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tyro, mutmut, coverage, pytest-cov.

What problem does it solve? Test suites often hold code in place without actually telling when code is wrong, because expectations are recomputed the same way the implementation computes them. This Skill provides a disciplined approach to writing tests: choosing the right seam to enter the system, deriving expectations from an independent oracle, and picking inputs that can distinguish a bug from a fix. It also measures what a suite fails to hold through mutation testing. ## Core Features & Use Cases - Seam, oracle, and input guidance: Decide where a test enters the system, where its expected values come from, and which inputs can discriminate a bug, including property-based testing and expected-failure patterns. - Mutation testing with harden: Run harden on a commit range to report surviving mutants the feature added, changed lines no test covers, and changes that could not be measured, comparing against the branch's merge-base. - Use Case: After finishing a feature branch in a Python pytest project, run harden to discover that a newly added function's arithmetic is not pinned by any test, then write a property test at the right seam before merging. ## Quick Start Ask the agent to review the tests for your current change and run harden to report any surviving mutants or uncovered lines before merging.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run mutation testing on a Python pytest project?

Run the harden script with a commit range such as `harden --range main..HEAD` in a clean repository. It mutates the functions your range touched using mutmut, compares survivors against the merge-base, and reports new survivors, uncovered lines, and unmeasured changes.

What is a test oracle and why does it matter?

A test oracle is a source of expected values independent of the implementation, such as a spec sentence, worked example, or invariant property. Expectations recomputed the same way the code computes them agree with the code by construction, even when both are wrong.

Does harden work with decorated functions and module-level code?

No. mutmut mutates only top-level functions and methods of top-level classes, so changes to decorated functions, properties, and module-level statements are reported as unmeasured rather than silently treated as clean.

Why does harden require a clean git working tree?

Harden mutates the tree it measures and reports results per commit, so uncommitted changes would be mutated without appearing in the measured range. A dirty tree is refused before any measurement begins.

What do harden exit codes 0, 1, and 2 mean?

Exit 0 means everything measured came back clean, exit 1 means findings such as a new surviving mutant or an uncovered changed line, and exit 2 means no findings but something could not be measured, such as unresolved mutants or unanalysable files.

When should I use property-based testing instead of example tests?

Use property tests when a spec states something that must always or never hold, since the property becomes a check over generated inputs at its seam. Generate whole valid domain values rather than raw randomness so the generator explores the space the code actually meets.