Test Automation / Quiz
Engineering Determinism
Frozen clocks, seeded randomness, hermetic data, and idempotent setup: building tests that produce one outcome per commit, on purpose.
- Difficulty
- Hard
- Format
- Quiz
- Points
- 200
- Estimate
- 10 min
// MISSION BRIEF
Your Mission
Flake prevention has a positive form: determinism engineering. Instead of hunting non-determinism after it bites, you design it out, clock, randomness, data, environment, and teardown, before the first run.
This is the hard-mode quiz for engineers who want suites that produce exactly one outcome per commit. Framework-agnostic.
Speed bonus active.
// FIRST CONTACT
Battle teaser
A test asserts 'expires tomorrow' rendering. It fails every day between 23:00 and 00:00 UTC. The engineering fix:
- ASkip the test during the failing hour via cron
- BControl the clock: freeze/mock time in the app under test (or inject a fixed 'now'), so day boundaries stop being a nightly lottery
- CRun CI only in the afternoon
- DAssert 'expires today OR tomorrow' to cover both
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
test-automationdeterminismflakinesstest-datatest-strategy