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
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
- Open the app's page
- Note in the log: “phase 1: doing UI work”
- Type “Slow Backend” into #name
- Type “wait@example.gov” into #email
- Choose “low” in #priority
- Take a screenshot (“work-done”)
- Note in the log: “phase 2: waiting for the 'slow backend' (idle, ~20s)”
- ⏱ Timed phase: backend wait
- Wait 20 s (fixed pause)
- Note in the log: “phase 3: results arrive, more UI work”
- Click #submit-btn
- Wait until #result appears
- Take a screenshot (“results”)
- 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
| Run | Status | Queued | Duration | Version | Trigger | Batch |
|---|---|---|---|---|---|---|
| #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) |