🧪 Test Hub
testing: Demo target v3.0.0 · built-in demo site

DEMO-004 Work, wait, then results

Edit Load test Duplicate

Demonstrates the activity replay: UI work, a ~20s idle wait, then results. The replay skips the idle stretch.

asyncdemoslow version: 1.0 DEMO-004__work_then_wait.py

Runs
3
Pass rate
100%
3 passed / 0 failed
Avg duration
21s
p95 21s
Estimate
21s
avg of last 10 judged runs
Flakiness
0.00
0 stable · 1 alternates
Current streak
3
passed

Last 3 results newest on the right — click a square to open that run

Duration per run point color = outcome; dashed = 7-run average; click a point to open the run

Step timing trends the same step compared across the last 3 runs — slowest steps first, one line each

How long it takes distribution of 3 runs — two humps mean two different behaviours hiding behind one average

fastest 21s · slowest 21s

Why this test failed grouped by message, last 90 days

No failures recorded. 👍

Outcomes by target version

What this test does plain language, derived from the code

  1. Open the app's page
  2. Note in the log: “phase 1: doing UI work”
  3. Type “Slow Backend” into #name
  4. Type “wait@example.gov” into #email
  5. Choose “low” in #priority
  6. Take a screenshot (“work-done”)
  7. Note in the log: “phase 2: waiting for the 'slow backend' (idle, ~20s)”
  8. ⏱ Timed phase: backend wait
  9. Wait 20 s (fixed pause)
  10. Note in the log: “phase 3: results arrive, more UI work”
  11. Click #submit-btn
  12. Wait until #result appears
  13. Take a screenshot (“results”)
  14. Check #result contains “Slow Backend”
Show the code
"""UI work, a long idle wait, then more work.

This is the pattern the ACTIVITY REPLAY exists for: frames are captured
while the form is being filled and while results appear, but the idle wait
in the middle produces (almost) no frames -- so the replay jumps straight
past it with a "skipped idle" marker instead of an hour of nothing.
"""


def run(page, ctx):
    page.goto(ctx.base_url)

    ctx.log("phase 1: doing UI work")
    page.fill("#name", "Slow Backend")
    page.fill("#email", "wait@example.gov")
    page.select_option("#priority", "low")
    ctx.screenshot("work-done")

    ctx.log("phase 2: waiting for the 'slow backend' (idle, ~20s)")
    with ctx.timed("backend wait"):          # shows up in Step timings
        page.wait_for_timeout(20000)         # your real tests might wait an hour here

    ctx.log("phase 3: results arrive, more UI work")
    page.click("#submit-btn")
    page.wait_for_selector("#result")
    ctx.screenshot("results")
    assert "Slow Backend" in page.inner_text("#result")

All runs

RunStatusQueuedDuration VersionTriggerBatch
#454 passed 2026-09-25 00:25:05 21s 3.0.0 cli-adopted 8 tests (terminal)
#446 passed 2026-09-25 00:24:35 21s 3.0.0 cli-adopted 8 tests (terminal)
#438 passed 2026-09-25 00:24:06 21s 3.0.0 cli-adopted 8 tests (terminal)