AGENT SKILL

testcase-reviewer

Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).

License 许可
Apache-2.0
所属仓库
quark-sri/qestack
最近更新
2026-11-14
Stars
★ 1
Forks
0

01 前言 Front Matter

name
testcase-reviewer
license
Apache-2.0
description
Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).
argument-hint
[test files, test folder or test case document]

02 资源文件 1

03 SKILL.md 正文

testcase-reviewer

Objective

A test is good when it fails on wrong behavior. Green tests, coverage and many assertions do not prove this. This skill reviews tests against the requirement, scores them with a rubric, and finds the reasons why a test could pass while the product is wrong.

Context

  1. Read .agents/qa-project-context.md if it exists. Use its conventions, test levels and requirement ID format.
  2. If it does not exist, read the existing tests and the documentation. Suggest qa-project-context once. Do not stop the work for it.

Discovery questions

  1. Which tests are in scope? Where are the requirements or the documented behavior for them?
  2. Were the tests written by an AI agent or in this conversation? Then say so; an independent session gives a fairer review.

Workflow

  1. Map each test to the behavior or requirement that it checks. Without a requirement, review against the test name and the documentation, and say so.
  2. Score each test with the review rubric: T1 to T7, 0 to 4 each, with evidence (file and line) for each score below 4.
  3. Find the weak patterns:
    • checks only "not null", "not empty", a type, a count or a status code
    • the expected value comes from the code under test, or from a snapshot of the current output
    • the unit under test is mocked, or only a mock call is checked
    • assertions in a loop or a condition that can run zero times
    • caught exceptions, early returns, disabled or skipped tests
    • fixed sleeps, the real clock, unseeded randomness, shared data, order dependence
    • one test checks many behaviors, or the name does not match the checks
  4. Group gaps for each requirement: the missing positive, negative, boundary and error cases.
  5. Verdict for each test (rules in the rubric), and the top fixes.

Output

## Test review: <scope>

Tests: <n> | accept <a> | revise <r> | reject <x>

| Test | T1 | T2 | T3 | T4 | T5 | T6 | T7 | Verdict | Main problem | Fix |
|---|---|---|---|---|---|---|---|---|---|---|

Missing cases by requirement: ...
Top 5 fixes: ...

Anti-patterns

  • Rewarding length, comments or good names instead of the power to fail.
  • Reviewing against the implementation. The code can be wrong; the requirement is the reference.
  • Scores without evidence. Each score below 4 needs a file and line and a fix.

Done when

  • Each test in scope has scores T1 to T7, a verdict and evidence for each score below 4.
  • Each revise or reject has a concrete fix.
  • The missing cases for each requirement are listed.

Related skills

  • mutation-probe: measures whether the tests catch faults.
  • test-coverage-map: the untested areas.
  • unit-testing and api-testing: rewrite the weak tests.
  • test-review-panel: a deeper review by eight independent personas.

04 同仓库更多 Skills

quark-sri
quark-sri/qestack

unit-testing

Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).

★ 1
quark-sri
quark-sri/qestack

ui-automation

Writes, fixes or structures browser end-to-end tests for critical journeys: role, label or test ID locators, auto-waiting assertions, API data setup, page objects, auth reuse and traces. Use when the user says 'UI test', 'end-to-end test' or 'our UI tests are brittle'. Not for business rules (use unit-testing).

★ 1
quark-sri
quark-sri/qestack

testability-review

Scores how testable a feature, module or design is before tests exist (seams for clock, randomness and network, hidden state, observability) and gives the smallest production change per blocker. Use when the user asks 'is this testable' or 'why is this hard to test'. Not for writing the tests (use unit-testing).

★ 1
quark-sri
quark-sri/qestack

test-strategy

Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).

★ 1
quark-sri
quark-sri/qestack

test-runner

Finds how a project runs its tests, runs the right subset, and triages each failure as product bug, test defect, environment problem or flaky test, with evidence. Use when the user says 'run the tests' or asks 'which tests fail and why'. Not for pipeline design (use ci-cd-integration).

★ 1
quark-sri
quark-sri/qestack

test-review-panel

Reviews tests or a change with up to 8 independent read-only reviewer personas, then merges their findings into one ranked list. Use when the user says 'review panel' or 'deep test review', asks 'is this change safe to merge', or wants AI-written tests reviewed from all angles. Not for a quick score (use testcase-reviewer).

★ 1