Test Generation
Test quality depends on case design, not count. This skill designs cases with equivalence classes, boundaries and fault injection, has AI write them, then uses mutation testing to check the tests themselves.
Workflow
- 1
Enumerate the input space
List normal values, boundaries, empty values, invalid types, oversized inputs and concurrency scenarios. Cover each equivalence class instead of writing one “success” case.
- 2
Inject realistic failures
Simulate timeouts, duplicate requests, partial failures, dirty dependency responses and insufficient permissions. Assert error handling and side effects, not just that an exception was thrown.
- 3
Generate and review test code
Require one behavior per test with names that state scenario and expectation. Remove duplicated setup and avoid shared mutable state between tests.
- 4
Validate with mutation testing
Deliberately break the implementation (negate conditions, remove boundary checks) and see whether tests fail. Surviving mutants mean the logic is not truly covered; add cases before shipping.
FAQ
Is higher coverage always better?
No. Coverage only shows code was executed, not that assertions are meaningful. Mutation testing and escaped defects better reflect test quality.
Can AI-generated tests be used directly?
Review whether assertions and mocks match real dependency behavior. Common issues are over-mocking, asserting implementation details and missing side effects.
Related skills
AI Code Review
Use AI for a first review pass so human attention goes to architecture, edge cases and security instead of formatting.
Legacy Refactor
Refactor legacy code without changing external behavior by adding tests, finding seams and replacing in small steps.
Code review workflow for B2B SaaS
A code review workflow for SMB buyers and business leads, addressing high acquisition costs and low trial conversion and delivering issue list (severity, location, cause, fix).