Nondeterministic Test - CI/CD Glossary Definition
A nondeterministic test relies on uncontrolled inputs such as time or randomness, making its outcome unpredictable.
A nondeterministic test produces results that depend on uncontrolled factors like timing, randomness, or system clock, so it can pass or fail without code changes. Nondeterminism is the root of most flakiness.
Sources include unseeded random values, real timestamps, network latency, and reliance on execution order. Making tests deterministic means controlling these inputs.
Fixes
Seed random generators, inject a fake clock, and stub network calls. Deterministic tests give the same result on every runner, every time.
Related guides
Flaky Test - CI/CD Glossary DefinitionFlaky Test: A flaky test passes or fails inconsistently on the same code, without any change. Common causes a…
Fake - CI/CD Glossary DefinitionFake: A fake is a test double with a working but simplified implementation, such as an in-memory database ins…
Test Isolation - CI/CD Glossary DefinitionTest Isolation: Test isolation means each test runs independently, without depending on or affecting other te…