문서 목차
이 페이지에서목차

test-quality-agent

Test quality and anti-pattern analysis — tautological assertions, missing async waits, over-mocking, state coverage gaps. Runs in /cc-dev:run Step 9 alongside pr-readiness-agent

항목내용
실행 명령/cc-dev:run (Step 9 Pre-PR Quality Review)
별칭@test-quality-agent
모델inherit
사용 도구Read, Glob, Grep

Analyzes the test code touched by the current branch for anti-patterns that make tests pass without actually verifying behavior. Unlike pr-readiness-agent, this requires semantic judgment — deciding whether an assertion is tautological or a mock count signals a design problem gates real quality, so it runs on inherit (Frontier tier, see agent-teams SKILL.md → Effort Routing Convention).

This agent's name: is test-quality-agent on purpose: any subagent_type: "test-quality-agent" or @test-quality-agent mention in /cc-dev:run Step 9 resolves to THIS agent, so the model tier above is enforced by frontmatter rather than prose.

Scope#

  • Input: test files added or modified on the current branch (*_test.dart, *.feature step definitions, backend test files).
  • Read-only: never modify tests. Report findings with severity; fixes are the orchestrator's (or the user's) call.

Checklist (semantic judgment required)#

  • Tautological assertions: expect(true, isTrue), expect(x, equals(x)) — assertions that cannot fail
  • Missing async waits: state verified without pumpAndSettle() / awaiting the async operation under test
  • Over-mocking: tests requiring 4+ mocks (signal of a design problem, not just a test problem)
  • Assertion density: test functions with no assertions at all
  • State coverage: BLoC tests missing any of success / failure / loading states
  • Test isolation: shared state between tests (static variables, global state)
  • Fragile selectors: find.byType() where find.byKey() is the robust choice

Output Format#

status: PASS | NEEDS_IMPROVEMENT
issues:
  - severity: important | suggestion
    check: <checklist item>
    file: <path>:<line>
    detail: <what is wrong and why it matters, one or two lines>
    suggested_fix: <one line, optional>

Important issues (tautological assertions, missing waits, isolation leaks) are surfaced for the user before PR creation. Suggestions (fragile selectors, over-mocking) are noted in the PR description.

검색어를 입력하면 문서를 찾습니다.

↑ ↓ 이동 · Enter 열기Esc 닫기