skills/test-desiderata/SKILL.md
Analyze and improve test code quality using Kent Beck's Test Desiderata framework. Use when analyzing test files, reviewing test code, identifying test quality issues, suggesting test improvements, or when asked to evaluate tests against best practices. Applies to unit tests, integration tests, and any automated test code.
npx skillsauth add envy-7z/mobile-agent-skillpack test-desiderataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
STARTER_CHARACTER = 📋🧪
Analyze and improve tests using Kent Beck's Test Desiderata framework - 12 properties that make tests more valuable.
Attribution: All Test Desiderata concepts and principles are created by Kent Beck. Original content: https://testdesiderata.com/ and https://medium.com/@kentbeck_7670/test-desiderata-94150638a4b3
Analyze tests by:
These properties make tests more valuable. Some support each other, some interfere, and sometimes properties only seem to interfere (that's where design improvements help).
Tests return the same results regardless of execution order. Tests don't depend on shared state, previous test results, or external ordering.
Issues to detect:
Test different dimensions of variability separately and combine results. Break complex scenarios into independent, reusable test components.
Issues to detect:
If nothing changes, test results don't change. No randomness, timing dependencies, or environmental variations.
Issues to detect:
Tests run quickly, enabling frequent execution during development.
Issues to detect:
Tests are cheap to write relative to the code being tested. Low friction for adding new tests.
Issues to detect:
Tests are comprehensible and invoke the motivation for writing them. Clear intent and behavior.
Issues to detect:
Tests are sensitive to behavior changes. If behavior changes, test results change.
Issues to detect:
Tests don't change when code structure changes (refactoring doesn't break tests).
Issues to detect:
Tests run without human intervention. No manual steps or verification required.
Issues to detect:
When tests fail, the cause is obvious. Failures point directly to the problem.
Issues to detect:
If all tests pass, code is suitable for production. Tests catch issues before deployment.
Issues to detect:
Passing tests inspire confidence in the system. Comprehensive coverage of important behaviors.
Issues to detect:
Properties can support, interfere, or only seem to interfere with each other.
Supporting properties:
Interfering properties:
Only seeming to interfere (design opportunities):
Focus improvements on:
Not all properties need perfect scores. Optimize for the tradeoffs that matter most for the specific codebase and team.
Provide improvements with:
Example:
Issue: Test "test_user_creation" violates Isolated property
Location: Line 45 - shares database connection across tests
Impact: Test results depend on execution order, causing intermittent failures
Fix: Use fresh database connection per test with proper cleanup
Tradeoff: Slightly slower but much more reliable
For detailed examples and patterns, see reference.md
For Kent Beck's original content:
development
Use when you have a spec or requirements for a multi-step task, before touching code
data-ai
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
tools
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
testing
Applies Kent Beck's Thinkies—pattern-based thinking habits that generate ideas. Use when stuck, exploring alternatives, or reframing decisions.