Skip to content
Latchkey

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

Run this faster and cheaper on Latchkey managed runners. Start free →