Software Testing / Learning brief

Mei sets pass or fail limits in k6

What this means in plain language

Mei adds thresholds and stages to a k6 script and reads the 95th percentile to get a clear verdict.

Understand the full idea, step by step

Analogy: a lift with a weight limit sign. A lift fills up person by person. A sign says that over a set weight it must not move. A guard watches the dial as people step in and out.

A k6 load stages list (steps that ramp the number of pretend users up and down) is the people stepping in and out. A k6 threshold limit (a pass or fail rule on a metric) is the weight sign. A k6 percentile reading (the time that most requests beat) is the dial.

Evidence & review

REVIEWED 2026-10-31

The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.

Hands-on steps for this tool. The people and the app are invented.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. Tools and screens change, and each team sets its own.

Sources for this brief — 3 sources
  1. Market practice

    Thresholds and Ramping VUs (Grafana k6 documentation) ↗ — Grafana Labs · Grafana k6 docs: a threshold such as p(95)<200 on http_req_duration sets a pass or fail limit, a failed threshold gives a cross and a non-zero exit code, abortOnFail can stop the test early, and each stage pairs a duration with a target while k6 ramps in a straight line (search excerpt, page not opened)

    The Grafana k6 pages on thresholds and ramping: a threshold such as p(95)<200 on http_req_duration sets a pass or fail limit. A failed threshold gives a cross and a non-zero exit code. The abortOnFail setting can stop the test early. Each stage pairs a duration with a target, and k6 ramps in a straight line to it. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Built-in metrics (Grafana k6 documentation) ↗ — Grafana Labs · Grafana k6 metrics page: http_req_duration is a trend metric for total request time, http_req_failed is a rate metric, and a failing check alone does not fail the run (search excerpt, page not opened)

    The Grafana k6 metrics page: http_req_duration is a trend metric for total request time. http_req_failed is a rate metric. Checks give a pass rate but do not stop the test when one fails. · Checked 2026-11-06

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. V27 supplement, 6 November 2026: relevant primary page sections actually opened; implementation-specific current product guidance, not universal standard. See full V27 audit for version and access scope.

  3. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

Learn this properly

START HEREk6 part 2: checks, thresholds and stages, with p(95) read the right wayTurn a plain run into a pass or fail test with limits, ramp the crowd up and down in stages, and read the 95th percentile of the request time.Opens at L0 Explain simply · about 16 min

Related briefs

Mei trains a newcomer and sets goals

Mei plans the first weeks of a new tester and reviews goals for Tom. A rowing crew helps her see why training comes before work and why a goal must be one the person controls.

READ BRIEF

Mei sets one form and one drawer

Mei finds two test cases with the same name and a drawer called Odds and ends. She sets one template, clear suites and fixed identifiers. A filing cabinet shows why order helps the whole team.

READ BRIEF