test-design
Installation
SKILL.md
Test Design: Universal Principles
These principles apply to every test you write, regardless of language or framework. Consult the active stack profile for framework-specific syntax; this skill provides the design thinking.
1. Test Isolation
Each test must be independent. Running tests in any order, or running a single test in isolation, must produce the same result.
Rules:
- No shared mutable state between tests. Each test sets up its own data.
- Use fixtures (pytest fixtures, setUp/tearDown, @Before/@After) for per-test setup.
- Avoid class-level or module-level state that persists across tests.
- Never depend on test execution order.
Anti-pattern:
# BAD: test_update depends on state from test_create
class TestUser:
user_id = None
Related skills