Test Master
Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.
Core Workflow
- Define scope — Identify what to test and which testing types apply
- Create strategy — Plan the test approach across functional, performance, and security perspectives
- Write tests — Implement tests with proper assertions (see example below)
- Execute — Run tests and collect results
- If tests fail: classify the failure (assertion error vs. environment/flakiness), fix root cause, re-run
- If tests are flaky: isolate ordering dependencies, check async handling, add retry or stabilization logic
- Report — Document findings with severity ratings and actionable fix recommendations
- Verify coverage targets are met before closing; flag gaps explicitly
Quick-Start Example
A minimal Jest unit test illustrating the key patterns this skill enforces:
// ✅ Good: meaningful description, specific assertion, isolated dependency
describe('calculateDiscount', () => {
it('applies 10% discount for premium users', () => {
const result = calculateDiscount({ price: 100, userTier: 'premium' });
expect(result).toBe(90); // specific outcome, not just truthy
});
it('throws on negative price', () => {
expect(() => calculateDiscount({ price: -1, userTier: 'standard' }))
.toThrow('Price must be non-negative');
});
});
Apply the same structure for pytest (def test_…, assert result == expected) and other frameworks.
Reference Guide
Load detailed guidance based on context:
| Topic |
Reference |
Load When |
| Unit Testing |
references/unit-testing.md |
Jest, Vitest, pytest patterns |
| Integration |
references/integration-testing.md |
API testing, Supertest |
| E2E |
references/e2e-testing.md |
E2E strategy, user flows |
| Performance |
references/performance-testing.md |
k6, load testing |
| Security |
references/security-testing.md |
Security test checklist |
| Reports |
references/test-reports.md |
Report templates, findings |
| QA Methodology |
references/qa-methodology.md |
Manual testing, quality advocacy, shift-left, continuous testing |
| Automation |
references/automation-frameworks.md |
Framework patterns, scaling, maintenance, team enablement |
| TDD Iron Laws |
references/tdd-iron-laws.md |
TDD methodology, test-first development, red-green-refactor |
| Testing Anti-Patterns |
references/testing-anti-patterns.md |
Test review, mock issues, test quality problems |
Constraints
MUST DO
- Test happy paths AND error/edge cases (e.g., empty input, null, boundary values)
- Mock external dependencies — never call real APIs or databases in unit tests
- Use meaningful
it('…') descriptions that read as plain-English specifications
- Assert specific outcomes (
expect(result).toBe(90)), not just truthiness
- Run tests in CI/CD; document and remediate coverage gaps
MUST NOT
- Skip error-path testing (e.g., don't test only the success branch of a try/catch)
- Use production data in tests — use fixtures or factories instead
- Create order-dependent tests — each test must be independently runnable
- Ignore flaky tests — quarantine and fix them; don't just re-run until green
- Test implementation details (internal method calls) — test observable behaviour
Output Templates
When creating test plans, provide:
- Test scope and approach
- Test cases with expected outcomes
- Coverage analysis
- Findings with severity (Critical/High/Medium/Low)
- Specific fix recommendations
Documentation
1---2name: test-master3description: Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines.4license: MIT5---67# Test Master89Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.1011## Core Workflow12131. **Define scope** — Identify what to test and which testing types apply142. **Create strategy** — Plan the test approach across functional, performance, and security perspectives153. **Write tests** — Implement tests with proper assertions (see example below)164. **Execute** — Run tests and collect results17 - If tests fail: classify the failure (assertion error vs. environment/flakiness), fix root cause, re-run18 - If tests are flaky: isolate ordering dependencies, check async handling, add retry or stabilization logic195. **Report** — Document findings with severity ratings and actionable fix recommendations20 - Verify coverage targets are met before closing; flag gaps explicitly2122## Quick-Start Example2324A minimal Jest unit test illustrating the key patterns this skill enforces:2526```js27// ✅ Good: meaningful description, specific assertion, isolated dependency28describe('calculateDiscount', () => {29 it('applies 10% discount for premium users', () => {30 const result = calculateDiscount({ price: 100, userTier: 'premium' });31 expect(result).toBe(90); // specific outcome, not just truthy32 });3334 it('throws on negative price', () => {35 expect(() => calculateDiscount({ price: -1, userTier: 'standard' }))36 .toThrow('Price must be non-negative');37 });38});39```4041Apply the same structure for pytest (`def test_…`, `assert result == expected`) and other frameworks.4243## Reference Guide4445Load detailed guidance based on context:4647<!-- TDD Iron Laws and Testing Anti-Patterns adapted from obra/superpowers by Jesse Vincent (@obra), MIT License -->4849| Topic | Reference | Load When |50|-------|-----------|-----------|51| Unit Testing | `references/unit-testing.md` | Jest, Vitest, pytest patterns |52| Integration | `references/integration-testing.md` | API testing, Supertest |53| E2E | `references/e2e-testing.md` | E2E strategy, user flows |54| Performance | `references/performance-testing.md` | k6, load testing |55| Security | `references/security-testing.md` | Security test checklist |56| Reports | `references/test-reports.md` | Report templates, findings |57| QA Methodology | `references/qa-methodology.md` | Manual testing, quality advocacy, shift-left, continuous testing |58| Automation | `references/automation-frameworks.md` | Framework patterns, scaling, maintenance, team enablement |59| TDD Iron Laws | `references/tdd-iron-laws.md` | TDD methodology, test-first development, red-green-refactor |60| Testing Anti-Patterns | `references/testing-anti-patterns.md` | Test review, mock issues, test quality problems |6162## Constraints6364**MUST DO**65- Test happy paths AND error/edge cases (e.g., empty input, null, boundary values)66- Mock external dependencies — never call real APIs or databases in unit tests67- Use meaningful `it('…')` descriptions that read as plain-English specifications68- Assert specific outcomes (`expect(result).toBe(90)`), not just truthiness69- Run tests in CI/CD; document and remediate coverage gaps7071**MUST NOT**72- Skip error-path testing (e.g., don't test only the success branch of a try/catch)73- Use production data in tests — use fixtures or factories instead74- Create order-dependent tests — each test must be independently runnable75- Ignore flaky tests — quarantine and fix them; don't just re-run until green76- Test implementation details (internal method calls) — test observable behaviour7778## Output Templates7980When creating test plans, provide:811. Test scope and approach822. Test cases with expected outcomes833. Coverage analysis844. Findings with severity (Critical/High/Medium/Low)855. Specific fix recommendations8687[Documentation](https://jeffallan.github.io/claude-skills/skills/quality/test-master/)