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, dynamic analysis, and test organization conventions for Java/Spring Boot applications. 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

Mocking Policy

The policy is the brief's (§ Mocking Policy) — enforce what it declares, not remembered defaults. The governing principle is tested-as-spec: a test asserts observable outcomes, and an interaction is asserted only where the interaction itself is the contract (events, notifications). Java-specific application:

AssertJ Assertions

Test Structure (see testing-principles.md)

Test Data Naming (see testing-principles.md, Three-Tier Convention)

Edge Case Coverage

Test Coverage

Parameterized Tests

State and Idempotency Testing

Security Testing Requirements

Boundary Testing

Error Path Testing

Concurrency Testing

Input Validation Testing

Dynamic Analysis

Build-Gate Analysis

./gradlew test

The test task is the reviewer's dynamic hook (Reviewer Conduct's permitted variants). The bound static checks (Spotless format among them) ride the quality gate: ./gradlew build runs check, so a failure blocks merge without the reviewer re-running it.

Concurrency

The JVM ships no race detector. Confidence comes from tests: repeated racy scenarios, CountDownLatch-choreographed interleavings, and review attention on shared mutable state. Escalate untested shared state; never assume safety.

Fuzz and Adversarial Testing

For input-parsing code, adversarial coverage is required. Bind a JVM fuzzer where the build declares the Jazzer dependency (com.code-intelligence:jazzer-junit); the floor is @ParameterizedTest over adversarial fixtures (malformed, truncated, oversized input).

Test Organization

Naming Conventions

The naming school is the brief's (§ Test Naming); the machine floor is test_name_pattern in scripts/layout.toml. Test data lives in test-data/ at the project root.

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.