metamorphic-test-generator
/metamorphic-test-generator
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties. Use when you need to expand test suites, test programs without oracles, validate mathematical or algorithmic properties, or detect subtle bugs through input-output relationships. The skill takes a program, original test cases, and metamorphic properties as input, generates new test cases by applying transformations, executes tests, verifies outputs satisfy properties, reports violations and anomalies, and outputs an expanded test suite with property coverage summary. Supports multiple pro
- Author
- ArabelaTso ↗
- Repository
- Skills-4-SE ↗
- Licence
- Apache-2.0
- Last repository change
- 21.08.2026
Assessment and security
- Files in this package
- 7
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.08.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: assets/example-program.py, scripts/generate.py
What it does and when to use it
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties. Use when you need to expand test suites, test programs without oracles, validate mathematical or algorithmic properties, or detect subtle bugs through input-output relationships. The skill takes a program, original test cases, and metamorphic properties as input, generates new test cases by applying transformations, executes tests, verifies outputs satisfy properties, reports violations and anomalies, and outputs an expanded test suite with property coverage summary. Supports multiple pro
Original author description
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties. Use when you need to expand test suites, test programs without oracles, validate mathematical or algorithmic properties, or detect subtle bugs through input-output relationships. The skill takes a program, original test cases, and metamorphic properties as input, generates new test cases by applying transformations, executes tests, verifies outputs satisfy properties, reports violations and anomalies, and outputs an expanded test suite with property coverage summary. Supports multiple pro
How it works
- Overview
- Quick Start
- What Gets Generated
- Common Metamorphic Properties
- Test Generation Report
- Usage
- Tips
SKILL.md preview
---
name: metamorphic-test-generator
description: Generate test cases using metamorphic testing by applying transformations based on metamorphic properties. Use when you need to expand test suites, test programs without oracles, validate mathematical or algorithmic properties, or detect subtle bugs through input-output relationships. The skill takes a program, original test cases, and metamorphic properties as input, generates new test cases by applying transformations, executes tests, verifies outputs satisfy properties, reports violations and anomalies, and outputs an expanded test suite with property coverage summary. Supports multiple programming languages and property types.
---
# Metamorphic Test Generator
## Overview
This skill generates test cases using metamorphic testing, applying transformations based on metamorphic properties to expand test suites and detect bugs through input-output relationships.
## Quick Start
```bash
# Generate metamorphic tests
python scripts/generate.py program.py --tests tests/ --properties properties.json
# Use specific metamorphic properties
python scripts/generate.py program.py --tests tests/ --properties "permutation,addition"
# Generate report
python scripts/generate.py program.py --tests tests/ --properties props.json --output report.json
```
## What Gets Generated
1. **Follow-up Test Cases** - New inputs derived from original tests
2. **Property Verification** - Checks that outputs satisfy metamorphic relations
3. **Violation Reports** - Identifies property violations and anomalies
4. **Expanded Test Suite** - Original plus generated tests
5. **Coverage Summary** - Property coverage and effectiveness
## Common Metamorphic Properties
- **Permutation** - Reordering inputs should not affect output
- **Addition** - Adding elements should increase/maintain result
- **Multiplication** - Scaling inputs should scale outputs proportionally
- **Inverse** - Applying inverse operation should return original
- **Equivalence** - Different representations should yield same result
- **Monotonicity** - Increasing input should increase/maintain output
## Test Generation Report
Generates detailed report with:
- **Original Tests** - Initial test cases count
- **Generated Tests** - New test cases created
- **Properties Applied** - Metamorphic relations used
- **Violations Found** - Property violations detected
- **Property Coverage** - Percentage of properties satisfied
- **Anomalies** - Unexpected behaviors identified
Example report:
```json
{
"original_tests": 20,
"generated_tests": 60,
"properties_applied": ["permutation", "addition", "inverse"],
"violations": 3,
"property_coverage": 95.0,
"anomalies": ["inverse property failed for negative inputs"]
}
```
## Usage
```bash
python scripts/generate.py <program> --tests <test_dir> --properties <properties> [--output <report.json>]
```
## Tips
- Define properties based on program semantics
- Start with simple properties (permutation, addition)
- Use metamorphic testing when oracles are unavailable
- Violations often indicate real bugs
- Combine with traditional testing for best results
- Document properties for future test maintenance
Files in this package (7)
- README.md 3 KB
- SKILL.md 3 KB
- assets/example-program.py 1 KB
- assets/properties-template.json 1 KB
- assets/test-cases-template.json 1 KB
- references/properties.md 4 KB
- scripts/generate.py 21 KB
Versions
The database has no other skills named metamorphic-test-generator.
Database snapshot: 13.11.2026 · package version 154b263ba45d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100test-oracle-generator
Generates automated test oracles to verify correct software behavior. Creates assertion-based oracles (expected values), property-based oracles (invariants), differential oracles (comparing implementations), and metamorphic oracles (input transformations). Use when you need to… - 100metamorphic-testing
Test systems with no reliable oracle using metamorphic relations — equivalence-preserving input transforms whose outputs must agree, with concrete relations for LLM/NLP stability. Use when: test without a correct answer oracle, write metamorphic relations, check paraphrase… - 100robust-testing
Guidelines and strategies for constructing meaningful test suites, property-based tests, metamorphic relations, and fuzzing harnesses. Trigger when: - Designing verification bounds, writing tests, creating test invariants, or implementing validation gates. - Prompt contains:… - 100generate-test-cases
Use when the user asks to analyze code for test coverage, list what test cases are needed, or review testing strategy — WITHOUT generating actual test code. - 100create-test-plan
Create a test plan when the user asks to plan testing, define test cases, create a QA strategy, write a test plan, or prepare for testing a feature - 96test-campaign
Build or improve a repository's native test suite for a stated correctness obligation. Use when a change needs complementary property, metamorphic, model, concurrency, recovery, or other test methods. Return replayable evidence and unresolved obligations.