Agent skill
testing-procedures
Test strategy design, test writing guide, and coverage targets. Use when writing tests, designing test plans, setting up test infrastructure, or evaluating test quality. Provides patterns for unit, integration, E2E, and API testing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/testing-procedures-avav25-ai-assets-2
SKILL.md
Testing Procedures
Systematic testing skill covering strategy, patterns, and quality gates. Produces consistent, maintainable test suites across tech stacks.
When to Use
- Writing new tests for features or bug fixes
- Designing test strategy for a new project or module
- Evaluating existing test coverage and quality
- Setting up test infrastructure (fixtures, factories, mocks)
- Creating or updating
TESTING.mddocumentation
When NOT to Use
- Running tests (use
/run-testsworkflow instead) - Reviewing test code quality (use
code-reviewskill) - Validating CI pipeline configuration (use
Agent(devops-engineer)role)
Test Pyramid
Follow the test pyramid for cost-effective coverage:
/ E2E \ Few — critical user journeys only
/----------\
/ Integration \ Moderate — API, DB, service boundaries
/----------------\
/ Unit Tests \ Many — fast, isolated, comprehensive
/--------------------\
| Layer | What to Test | Speed | Count |
|---|---|---|---|
| Unit | Pure logic, transformations, validators, utils | < 50ms | Many |
| Integration | DB queries, API endpoints, service interactions | < 5s | Moderate |
| E2E | Critical user journeys, happy paths, key flows | < 30s | Few |
Test Design Principles
- Test behavior, not implementation — assert outcomes, not internal calls
- One assertion per concept — each test verifies one logical thing
- Arrange-Act-Assert — clear structure in every test
- Deterministic — no flaky tests. Mock time, randomness, external services
- Independent — tests must not depend on execution order
- Descriptive names — test name describes the scenario:
should_return_404_when_user_not_found - Fast feedback — unit tests run in seconds, not minutes
Coverage Targets
| Metric | Target | Hard Minimum |
|---|---|---|
| Line coverage | ≥ 80% | ≥ 60% |
| Branch coverage | ≥ 75% | ≥ 50% |
| Critical path coverage | 100% | 100% |
| New code coverage | ≥ 90% | ≥ 80% |
Critical paths = authentication, authorization, payment, data mutations, error handling.
Key Context File
Projects should have a TESTING.md at the root (and per-service in monorepos) documenting test infrastructure, commands, credentials, and organization. Created by /project-init using Agent(qa-engineer). Always read TESTING.md before writing or running tests.
Integration
- Follows rules:
Agent(qa-engineer)(test strategy, automation, local test infra),Agent(software-engineer)(code quality) - Used by workflows:
/test-local(full local QA cycle),/run-tests(lightweight execution),/project-init(TESTING.md generation),/feature-dev,/bugfix,/pre-commit - Companion resources:
test-writing-guide.md - Template:
templates/testing.template.md(root + per-service TESTING.md templates) - Project context:
TESTING.md(root + per-service)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?