test-design-review

Review test cases and test plans against test design guidelines to assess design quality and identify areas for improvement.

Last repository push
GitHub Stars
194
Forks
13
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "test-design-review" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6388de9949c197b2774de0e5e33b9a2bd4215007d7c6220402e422a760402498. Verify the upstream source and version against https://github.com/jasonswett/llm-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Review test cases and test plans against test design guidelines to assess design quality and identify areas for improvement.

0 Downloads

Introduction source: third_party · jasonswett · 0.0.1 Reference

SkillPi interpretation

Tasks
Review tests (or a git diff containing tests) against an authoritative dual rubric: **Dave Farley's Properties of Good Tests** and **Gojko Adzic's Specification by Example (BDD)**.
Inputs and outputs
```markdown
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: test-design-review
description: >
  Critically review tests or diffs against Dave Farley's Properties of Good Tests
  and Gojko Adzic's Specification by Example principles. Evaluates test speed,
  determinism, atomicity, maintainability, necessity, and behavior-versus-implementation
  fidelity, flagging violations with concrete fixes. Triggers on: 'test review',
  'review tests', 'review these tests', 'critique tests', 'test design review'.

Test Design Review

Review tests (or a git diff containing tests) against an authoritative dual rubric: Dave Farley's Properties of Good Tests and Gojko Adzic's Specification by Example (BDD).


The Dual Rubric

1. Dave Farley's Properties of Good Tests

Every unit and integration test must satisfy Farley's 6 core properties:

Property Standard Violation Tells
Fast Unit tests execute in milliseconds; test suite runs in seconds. Use of sleep(), artificial delays, network calls, slow disk I/O in unit tests.
Maintainable Tests change only when requirements change, not when internal code refactors. Fragile mocks coupling to private methods; copy-pasted 50-line test setups.
Repeatable Deterministic: passes 1,000 times out of 1,000 runs in any order on any machine. Flakiness, reliance on system timezone/clock, random seeds without fixed seeding, database pollution across runs.
Atomic Each test is completely self-contained, tests one logical behavior, and fails for exactly one reason. Cascading failures (Test B fails only if Test A runs first), .first or .last queries dependent on DB ordering.
Necessary Every assertion validates a required domain capability or invariant. Tautological assertions (assert true), testing standard library or framework features, redundant is_successful checks before body checks.
Understandable Serves as living documentation. Clear Arrange-Act-Assert structure and intention-revealing names. Vague test names (test_case_1, it_works), mixed levels of abstraction, obscure assertions.

2. Gojko Adzic's Specification by Example (BDD)

Tests are executable specifications. They must reflect business behavior, not mechanical wiring:

Principle Standard Violation Tells
Behavior over Implementation Specify what happens in response to a business event, not how functions communicate internally. Asserting method call counts (verify(service, times(3))), mocking internal collaborators excessively, inspecting private state.
High Signal-to-Noise Ratio Every variable, input, and assertion in the test directly influences the outcome. Incidental boilerplate, 20 unneeded mock returns, arbitrary dummy data obscuring the relevant parameter.
Concrete Domain Examples Illustrate edge cases and rules with realistic domain examples rather than abstract placeholders. Meaningless test values (foo, bar, asdf, test1), lack of domain edge-case verification.
Living Documentation Specification names describe scenarios and business consequences. Technical names (test_process_data_flag_false) instead of domain rules (when_account_is_suspended_reject_withdrawal).

Review Process

When reviewing tests:

  1. Locate Target Tests:
    • If specific files/lines are provided, review those.
    • If a diff or branch is provided, extract all modified or added test files (git diff origin/main...HEAD -- '*test*' '*spec*').
  2. Evaluate Farley Properties:
    • Audit test speed, isolation, determinism, and atomicity.
    • Check for test pollution risks (global state, uncleaned fixtures, ordering dependencies).
  3. Evaluate Adzic Specification Fidelity:
    • Check if tests read as executable specifications.
    • Identify tests coupled to implementation details rather than behavior.
    • Check signal-to-noise: flag incidental setup or redundant assertions.
  4. Produce Structured Review Report:
    • Output the Farley Scorecard & Adzic Scorecard.
    • For every flagged violation: provide file path, line numbers, offending code, explanation, and a drop-in replacement fix.

Review Report Output Template

# Test Design Review

## Summary & Recommendation
- **Target:** `<file or diff>`
- **Verdict:** [PASS / NEEDS REVISION / BLOCKING]
- **Key Takeaway:** <1-2 sentences on overall test quality>

## Farley Properties Scorecard
- **Fast:** [Pass / Warning / Fail] — <notes>
- **Maintainable:** [Pass / Warning / Fail] — <notes>
- **Repeatable:** [Pass / Warning / Fail] — <notes>
- **Atomic:** [Pass / Warning / Fail] — <notes>
- **Necessary:** [Pass / Warning / Fail] — <notes>
- **Understandable:** [Pass / Warning / Fail] — <notes>

## Adzic Specification Scorecard
- **Behavior over Implementation:** [Pass / Warning / Fail] — <notes>
- **Signal-to-Noise Ratio:** [Pass / Warning / Fail] — <notes>
- **Concrete Examples:** [Pass / Warning / Fail] — <notes>

## Detailed Findings & Fixes

### 1. [Violation Name] (`path/to/test.ext:L12-L25`)
- **Rubric Rule:** Farley (Atomic) / Adzic (Behavior over Implementation)
- **Problem:** <explanation of the defect>
- **Offending Code:**
```code
<bad code>
  • Recommended Fix:
    <improved code>

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 基于 Dave Farley 和 Gojko Adzic 的权威测试设计准则,提供专业级测试质量评估框架
  • 支持对测试速度、确定性、原子性、可维护性等关键属性进行系统性审查
Trigger Precision95/100

Highlights

  • 触发词覆盖全面且语义明确,包括 'test review'、'critique tests' 等多种自然表达
Structure and Standards80/100

Areas to improve

  • 缺少 When to Use 章节和端到端示例 Reported severity: Minor

    文档提供了输出模板但未展示一个完整的实际审查案例,用户可能难以理解如何应用该 Skill

    Recommendation: 补充一个真实的测试审查示例,展示从输入到输出的完整流程

Highlights

  • 采用双维度评分卡结构(Farley Properties + Adzic Specification),逻辑清晰且专业性强
  • 每个违规项均提供具体修复建议,具备强可操作性
Execution Reliability65/100

Areas to improve

  • 未处理无效输入和执行环境依赖 Reported severity: Major

    未说明当用户提供非测试文件、空 diff 或缺乏 Git 环境时的处理机制,可能导致执行失败

    Recommendation: 增加输入验证逻辑说明,并明确所需执行环境(如是否需要 Git、是否支持多种语言测试文件)

Highlights

  • 输出报告模板结构化程度高,便于集成到 CI/CD 或代码评审流程中
Evidence Verifiability (mean of the first four)81/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.