Shared State - CI/CD Glossary Definition
Shared state is mutable data reused across tests, and a common source of interference between them.
Shared state is data or resources (globals, singletons, a common database, files) accessed by multiple tests. Mutable shared state is a primary cause of flaky, order-dependent tests.
Read-only shared state (constants, fixtures) is safe. Mutable shared state must be reset between tests or scoped per test to preserve isolation.
In CI
Parallel runners multiply shared-state risk. A shared test database needs per-worker schemas or transactions rolled back after each test.
Related guides
Test Pollution - CI/CD Glossary DefinitionTest Pollution: Test pollution occurs when one test leaves behind state (files, database rows, global variabl…
Test Isolation - CI/CD Glossary DefinitionTest Isolation: Test isolation means each test runs independently, without depending on or affecting other te…
Setup - CI/CD Glossary DefinitionSetup: Setup is the phase that runs before a test to prepare the state it needs, such as creating objects, se…