Test review

From woditschka/agentic-coding-reference · View interactive version

Test review is an AI agent skill from the GitHub repository woditschka/agentic-coding-reference. Test quality checklist, security-testing requirements, and dynamic-analysis expectations — language-agnostic, with per-section slots a stack fills in. Load when conducting test reviews.

How to use this skill

Skill file

Project Testing Policy (read from the brief)

The policy values this review enforces are project-owned and live in CODE0: the test pyramid ratios (§ Test Pyramid), the coverage measure (§ Coverage), the mocking policy (§ Mocking Policy), and the naming school (§ Test Naming). Read them before reviewing and enforce what the brief says, not remembered defaults — the brief is the contract that survives harness upgrades. If the brief contradicts itself or the code under review reveals a gap in it, raise a clarify finding against the brief instead of silently substituting your own values.

Test Placement

The brief's pyramid section is a placement rule, not a ratio to eyeball. The design doc's assignment governs. For every new or changed rule in the diff, find the component docs/system-design.md assigns it to, then check where its tests landed:

Judge placement against the components docs/system-design.md assigns first and docs/testing-principles.md § Test Pyramid second, never a remembered ratio. A brief sentence that reads unconditionally yields to the design doc's assignment; a conflict between the two briefs is a clarify to the system-design-expert. Every placement finding cites the assignment it enforces.

Test Quality Checklist

The principles below are language-agnostic. Each Stack-specific rules slot is where this project records the test conventions its framework imposes.

Test Coverage

Test Structure

Useful Failure Messages

Test Helpers

Mocking Policy

The policy is the brief's (§ Mocking Policy). Apply its boundary rule: mock at system boundaries, use real implementations within them.

| Collaborator | Mock? | Why |

|---|---|---|

| External service / network client | Yes | System boundary |

| Internal types | No | Use the real implementation |

| Clock / time / randomness | Yes | Deterministic testing |

The governing principle is tested-as-spec: a test asserts observable outcomes, and a mock interaction is asserted only where the interaction itself is the contract. Each interaction assertion in the changed tests is cleared by naming the behavioral assertion it does not duplicate, or is an autofix finding, severity fixable.

Security Testing Requirements

Boundary Testing

Error Path Testing

State and Idempotency Testing

Concurrency Testing

Input Validation Testing

Dynamic Analysis

Run the test verb through the gate (scripts/gate.sh test); static analysis rides the gate's lint verb, which the reviewer never re-runs. Where the stack offers stronger dynamic tools, bind them into the relevant verb and require them:

Test Organization

Common Issues to Flag

[AUTOFIX] Issues

[ESCALATE] Issues

[CLARIFY:security-reviewer] Issues

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.