AGENT SKILL

tdd-mutation-tester

Performs simple mutation testing to verify test coverage and assertions.

License 许可
MIT
最近更新
2026-10-31
Stars
★ 0
Forks
0

01 前言 Front Matter

id
tdd-mutation-tester
name
tdd-mutation-tester
license
MIT
metadata
{ "author": "lgzarturo", "category": "testing" }
description
Performs simple mutation testing to verify test coverage and assertions.
compatibility
{ "tools": [ "claude", "codex", "gemini", "agy", "opencode" ], "stacks": { "languages": [ "typescript", "javascript", "python", "kotlin", "java", "php" ] } }
user-invokable
true

03 SKILL.md 正文

TDD Mutation Tester

Core Principles

  1. Verify Assertion Quality: Coverage percentage can be misleading. Tests must fail when business logic changes.
  2. Mutation Process:
    • Locate the core logic implemented by the implementer.
    • Temporarily mutate a logical operator (e.g. swap > for <, == for !=, + for -, or invert a boolean).
    • Run the test suite.
    • Expected Result: At least one test MUST fail.
    • Clean Up: Revert the mutated symbol immediately after running the test.
  3. Scorecard: If the test suite passes even with mutated business logic, report a "0 in Real Coverage" on the scorecard and return the task for better test assertions.

04 同仓库更多 Skills