parameterized-testslisted
Install: claude install-skill dceoy/ai-coding-agent-skills
# Parameterized Tests
Use data-driven tests whenever multiple unit-test cases exercise the same behavior with the same test logic.
## Core Rule
When adding or modifying unit tests, if two or more cases share the same setup, execution, and assertion semantics and differ only in inputs, expected outputs, expected errors, options, or equivalent case data, express them with the test framework's native parameterization mechanism.
If a new case would duplicate an existing standalone test with the same test logic, consolidate the touched group instead of adding another duplicated test.
## Workflow
1. Inspect nearby tests and repository guidance to identify the testing framework and established idioms.
2. Identify cases that share setup, execution, and assertion semantics.
3. Parameterize groups of two or more equivalent cases with the framework's native mechanism.
4. Keep each case independently identifiable in test output when the framework supports case names or IDs.
5. Prefer explicit case data over branching inside the shared test body.
6. Run the narrowest relevant test command after the change.
See [references/frameworks.md](./references/frameworks.md) for common framework idioms.
## Parameterize
Parameterize when cases differ only by data such as:
- Inputs or arguments.
- Expected return values.
- Expected errors or exception values when the assertion structure remains the same.
- Flags, options, environment values, or fixtures used uniformly by every case.
- Bounda