ALL-TEST1002 · test_isolation
Judge whether tests control state without losing meaningful behavior.
This is a contextual rule for all languages. Read its implementation.
Definition
Section titled “Definition”Compare fixtures, shared state, order dependence, external services, clocks, randomness, cleanup, parallel execution, and mock boundaries.
Evidence
Section titled “Evidence”Findings cite tests, fixtures, state transitions, order trials, and environment dependencies.
Exceptions
Section titled “Exceptions”Integration suites may share expensive infrastructure when isolation is restored between cases.
Examples
Section titled “Examples”A test depending on another test to create a record is shared. A database fixture that resets
state while exercising real queries is integrated and isolated.
References
Section titled “References”- Cites “xUnit Test Patterns”, Independent Test
- Cites “Software Engineering at Google”, Test Doubles
- Cites “Test-Driven Development with Python”, test isolation