CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/flake-pattern-reference

Reference catalog of the eight flake patterns - async/timing, test ordering, shared parallel state, resource leaks, network, locator drift, environment variance, randomness - with detection heuristics, remediation per pattern, and the concrete code-level fixes: replacing fixed sleeps with framework auto-waits, isolating state in beforeEach fixtures, per-worker DB schemas via workerIndex, try/finally teardown, mocking network + clock at the boundary, stable role-based locators, TZ pinning, and RNG seeding. Use when triaging an unknown flake to identify the category before bisecting, or when a classified flake needs the specific code change to apply.

98

1.07x
Quality

91%

Does it follow best practices?

Impact

99%

1.07x

Average score across 10 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Evaluation results

100%

Archive tests fail about a quarter of the time with three different errors

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Every archive call is awaited

100%

100%

No sleep, poll, or retry left in the file

100%

100%

Diagnosis names the unawaited operation

100%

100%

Source and assertions untouched

100%

100%

Cross-test contamination explained, not just suppressed

100%

100%

Review rule stated

100%

100%

100%

26%

Cart tests in one file disagree about the same cart

Criteria
Without this plugin
With this plugin

Suite passes with all five tests intact

100%

100%

Each test builds its own cart

100%

100%

Diagnosis names in-place mutation of a shared fixture

0%

100%

Expected values untouched

100%

100%

No retry, reorder, or quarantine as the fix

100%

100%

Production source unchanged

100%

100%

Result is order-independent

100%

100%

Forward rule stated

0%

100%

98%

17%

Due-date tests fail at night here and all day in the Tokyo office

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Tests run against a fixed instant, not the ambient clock

71%

92%

Fixture and expectation share one frame of reference

83%

100%

Notes name the ambient clock as the shared cause

90%

100%

No skip, retry, or tolerance widening

100%

100%

Production source unchanged

100%

100%

Boundary is now covered rather than avoided

40%

100%

Forward rule stated

75%

100%

100%

Import tests fail on the shared CI box but never on a laptop

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Assertions gated on the completion signal

100%

100%

No longer wait, retry, or timeout bump

100%

100%

Write-up names the fixed-duration wait as the mechanism

100%

100%

Explains why a longer wait is not the fix

100%

100%

Source and assertions untouched

100%

100%

Suite is not slower than the work it measures

100%

100%

98%

-2%

Inventory import test fails about once a week and never reproduces

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Test data is reproducible run to run

100%

100%

Generated data respects the documented contract

100%

85%

Report names uncontrolled test data as the single cause

100%

100%

No retry, rerun, or quarantine as the fix

100%

100%

Assertions kept at full strength

100%

100%

Production source unchanged

100%

100%

Review rule stated

100%

100%

100%

One of the two API test files dies before its tests run

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Each file binds a port the OS assigns

100%

100%

No serialisation, retry, or quarantine as the fix

100%

100%

Notes name the contended resource and read the evidence

100%

100%

Servers are still shut down

100%

100%

Source and assertions untouched

100%

100%

Rule stated for the next file

100%

100%

100%

Profile tests fail on the order of the results, never on the contents

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Assertions no longer depend on position

100%

100%

Coverage preserved

100%

100%

Diagnosis names the arbitrary result order

100%

100%

No wait, retry, or serialisation as the fix

100%

100%

Production source unchanged

100%

100%

Rule stated for future assertions

100%

100%

100%

7%

Session tests only pass when the whole file runs

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

Every test arranges its own precondition

100%

100%

Leftover session state is cleared between tests

50%

100%

Notes name the implicit precondition dependency

100%

100%

No quarantine, retry, or enforced ordering as the fix

100%

100%

Production source unchanged

100%

100%

Assertions still describe their own scenario

100%

100%

Forward rule stated

100%

100%

100%

The elapsed-time test is red in the suite and green on its own

Criteria
Without this plugin
With this plugin

Deliverables present and green

100%

100%

The replacement is undone after the test that installs it

100%

100%

Diagnosis names the unrestored global replacement

100%

100%

Assertions kept at full strength

100%

100%

No reorder, retry, or quarantine as the fix

100%

100%

Source unchanged

100%

100%

The first test still pins the time it needs

100%

100%

Rule stated for the next test

100%

100%

100%

23%

Whichever test we put sixth in the file is the one that fails

Criteria
Without this plugin
With this plugin

Deliverables present and green

50%

100%

Every acquired connection is returned

100%

100%

Release survives a failing test

100%

100%

The file proves it leaves nothing checked out

100%

100%

Notes name the unreturned resource and the position effect

0%

100%

No raised limit, retry, or file split as the fix

100%

100%

Source unchanged

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6