AgentSkillsCN

test-quality

在测试评审过程中,制定测试质量评估标准。在评估测试的实质性覆盖率、组织结构、可维护性,以及测试数据的真实性和多样性时,应严格遵循这些标准。

SKILL.md
--- frontmatter
name: test-quality
version: 1.0.0
description: Test quality assessment criteria for reviewing tests. Apply when evaluating tests for substantive coverage, organization, maintainability, and realistic test data variety.
user-invocable: false
layers:
  rules: rules.md
  examples: examples.md

Test Quality Assessment

Evaluate whether tests verify true functionality rather than rubber-stamping code with superficial assertions.

Layers:

  • rules.md - Quick reference and severity guidance
  • examples.md - Detailed code examples

Quick Reference

FactorQuestionSeverity if problematic
Substantive assertionsDoes the test prove anything meaningful?Critical
True functionalityIs observable behavior tested, not implementation?Critical
Test organizationAre tests in the right module and cohesive?Improvement
Edge case coverageAre error paths and boundaries tested?Critical/Improvement
Test data varietyIs data varied or repetitive?Improvement
Fixture usageAre fixtures reducing duplication without tight coupling?Improvement
Mock disciplineAre mocks used only when necessary?Improvement/Critical
Tests runDo tests actually pass without errors?Critical

Quick Heuristic

A test is valuable if:

  • Failure reveals bugs: The test would fail if the implementation was wrong
  • Survives refactoring: The test wouldn't break if implementation details changed
  • Documents intent: Reading the test explains what the code should do
  • Runs independently: The test passes regardless of execution order

For rules: see rules.md For examples: see examples.md