Presets
Playback
Test model (same as 2D)
Identical formulas and random draws to the 2D page.
View
Camera
Layers
Quality
Model checks
The science
Detection as repeated Bernoulli trials
If every test run independently triggers a given defect with probability p, the defect survives n runs with probability (1-p)n and is found with probability 1-(1-p)n. In the burrow this is depth: a bug that a single run finds with probability p is buried the deeper the smaller p is (depth is drawn linearly in ln p, from 0.5 m at p = 0.5 down to 6.5 m at p = 0.0005, purely as a picture).
Mixture of easy and hard defects
With B defects, a share f of them hard (ph) and the rest easy (pe), the expected number found after n runs is E(n) = (B-nh)[1-(1-pe)n] + nh[1-(1-ph)n] with nh = round(fB). The two exponentials have very different time constants (1/pe against 1/ph), so the curve rises fast and then crawls: the long tail is why a green test suite never proves the absence of bugs. The variance of the count is the sum of the independent Bernoulli variances, sum pi(1-pi).
What the animation shows
For every bug a geometric waiting time t = ceil(ln(1-u)/ln(1-p)) is drawn once from a seeded generator (the same generator and draw order as the 2D page, so seed 12345 gives the same random run). When the run counter reaches t the bug climbs out of the soil and walks to the evidence table. The gantry sweep is only a picture of one test run; above 2 runs per second it sweeps at 2 Hz while the counter still advances exactly.
Independent numerical checks
Check 1 compares the number of bugs found so far in this random run with E(n) within four standard errors. Check 2 runs a completely different experiment: every bug is tried run after run with fresh Bernoulli draws from a different seed, and the count at the last run is compared with the closed form. Both must agree, otherwise the box turns red.
Honest simplifications
Runs are independent and equally effective. Real suites are correlated (many tests exercise the same code) and adaptive (testers learn from failures), so this is an optimistic baseline; each bug has a single fixed detection probability and, once found, is fixed without introducing new bugs. The numbers of easy and hard bugs are inputs, not something you can know in practice. Burial depth and the sweeping gantry are visual metaphors, not model quantities.
Things to try
- Preset All bugs easy against Hard-bug heavy: the same number of runs finds very different shares.
- Raise the hard-bug probability (a boundary-value or risk-based strategy) and watch the orange band rise towards the green one.
- Press New random seed repeatedly: the yellow curve scatters around the green one by about the 4 SE band shown.
Educational model; not a testing-process recommendation.