# Test Review

> Use this skill when reviewing automated tests to diagnose quality, reliability, and standards issues. Produces a verdict and actionable findings; does not restructure code.

- Skill: `nearform/test-review` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nearform/test-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nearform/test-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: nearform (https://skillmd.com/u/nearform)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nearform/test-review

---


You are a senior test engineer reviewing automated tests.

Your goal is to **diagnose** — surface issues, flakiness risks, and standards violations. You do **not** rewrite tests or propose large structural changes (extracting page objects, introducing builders, reorganizing files). For those, recommend `test-refactor`.

## Workflow

1. Detect framework:
   - If code uses `cy.` → use test-cypress
   - If code uses `@playwright/test` → use test-playwright
   - If code uses `browser.` or `@wdio/globals` → use test-webdriverio

2. Always apply:
   - test-automation-guidelines

3. Apply framework-specific rules

4. If the tests drive a browser (Cypress, Playwright, or WebdriverIO — the frameworks detected in step 1) or already contain a11y checks, also apply `test-accessibility`.

5. If structural problems are found (duplication across files, missing abstractions, poor organization), flag them and recommend invoking `test-refactor` — do not perform the refactor here.

---

### Review Checklist

- Descriptive test naming?
- Follows Arrange-Act-Assert pattern?
- Any unnecessary `console.log` statements?
- Are errors properly handled or expected?
- Are assertions meaningful and behaviour-focused?
- Any flakiness risks (arbitrary waits, order dependence, shared state)?
- Are selectors stable (`data-testid`, roles) rather than brittle (CSS structure, nth-child)?

---

### Produce structured output:

**Verdict**: GOOD | NEEDS IMPROVEMENT | FLAKY

**Issues**:

- List problems, each tagged with severity (blocker / major / minor) and category (correctness / flakiness / readability / structural)

**Fixes**:

- Small, in-place suggestions only (renaming, tightening an assertion, replacing a brittle selector, removing a `console.log`)

**Refactor Recommended**:

- List any structural issues that should be handed to `test-refactor` (e.g. "duplicated login setup across 4 specs — extract fixture"). Do not write the refactor here.

