A short tracking pass meant to be repeated under load. Each step is timed separately, so a load run shows which one degrades when many browsers track shipments at once.
demofreightload version: 1.0 DEMO-018__freight_load_tracking.py
Runs
2
Pass rate
100%
2 passed / 0 failed
Avg duration
2s
p95 2s
Estimate
2s
avg of last 10 judged runs
Flakiness
0.00
0 stable · 1 alternates
Current streak
2
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 2 runs — slowest steps first, one line each
Outcomes by target version
What this test does plain language, derived from the code
- site = Freight(page, ctx)
- ⏱ Timed phase: open the home page
- site.open()
- ⏱ Timed phase: track a shipment in transit
- site.track("AF-100001")
- ⏱ Timed phase: track a delivered shipment
- site.track("AF-100002")
- assert page.inner_text("#track-status") == "Delivered"
- ⏱ Timed phase: track an unknown number
- site.track("AF-000001")
- assert page.is_visible("#track-not-found")
Show the code
"""A short public-tracking pass, built to be repeated UNDER LOAD.
A load test runs one test over and over in several real browsers at once,
so the test itself is short and every step is timed separately. Tracking
reads the shipments database, and the database has a limited number of
connections: with enough people tracking at once, lookups queue. The load
run's "which step got slower" table is where that shows -- and comparing a
load run on release 1.0.0 with one on 1.1.0 shows what 1.1.0's faster
database did about it.
"""
from _lib.freight import Freight
def run(page, ctx):
site = Freight(page, ctx)
with ctx.timed("open the home page"):
site.open()
with ctx.timed("track a shipment in transit"):
site.track("AF-100001")
with ctx.timed("track a delivered shipment"):
site.track("AF-100002")
assert page.inner_text("#track-status") == "Delivered"
with ctx.timed("track an unknown number"):
site.track("AF-000001")
assert page.is_visible("#track-not-found")