robust-testing

Designs property-based, metamorphic, and fuzz-testing harnesses to verify code against invariants.

10|2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/nrdxp/predicate --skill robust-testing-nrdxp
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: robust-testing
Source: https://github.com/nrdxp/predicate/tree/main/skills/robust-testing
Command: npx skills add https://github.com/nrdxp/predicate --skill robust-testing-nrdxp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code often ships with example-based tests written by the same agent that wrote the implementation, propagating identical blind spots into both files. This Skill replaces that self-deception loop with verification against mathematical properties, invariants, and randomized input spaces. ## Core Features & Use Cases - Property-Based Testing (PBT): Extract algebraic invariants (round-trip, commutativity, idempotency, monotonicity) from specifications and validate them with randomized generators using tools like hypothesis or proptest. - Metamorphic Testing: Solve the oracle problem by asserting metamorphic relations (permutation, scaling, monotonicity, invariance) across perturbed inputs when expected outputs are unknown or expensive to compute. - Fuzzing & Hierarchical Verification: Build fuzzing harnesses for untrusted input boundaries and structure test suites in tiers from compiler gates through E2E and differential assertions. - Use Case: When implementing a serialization module, instead of hardcoding input-output examples, write a round-trip property test asserting decode(encode(x)) == x across randomized inputs, then fuzz the parser boundary for crash resistance. ## Quick Start Ask the agent to design a property-based test suite with metamorphic relations and a fuzzing harness for the module you are implementing.

Frequently Asked Questions about robust-testing

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

FAQPage Schema
How do I write property-based tests instead of example-based unit tests?▼

Extract algebraic invariants from the specification first, then define a randomized input generator using a framework like hypothesis or proptest and assert the invariant. Common patterns include round-trip, commutativity, idempotency, and monotonicity properties.

What is metamorphic testing and when should I use it?▼

Metamorphic testing asserts relations between outputs of perturbed inputs when the correct output is unknown or expensive to compute. Use it for oracle-less systems like optimization routines, matrix operations, or search engines, applying relations such as permutation, scaling, or monotonicity.

When should I use fuzzing versus property-based testing?▼

Use fuzzing when a module accepts untrusted external data, parses custom protocols, or handles serialization formats, to find crashes and memory safety bugs. Use property-based testing when the domain has algebraic invariants and mature PBT framework support.

Why do AI-generated test suites fail to catch real bugs?▼

The same agent generates both implementation and tests, propagating identical logical blind spots into both files. Verifying against properties and invariants across randomized inputs breaks this self-deception loop by testing behavior independently of hardcoded examples.

How do I validate that a test suite itself is correct?▼

Require every test to trace to a specification constraint, confirm the suite fails on empty or unimplemented code as a baseline check, and audit generators to ensure they cover the full input domain including null, negative, empty, and maximum-limit edge states.