Run Performance Tests
In brief: Run-perf-tests is script-first k6 execution—related journeys for a PR, or prior-SHA-to-cut-SHA for a named release, with baseline comparison on matching dimensions and optional nested authoring when the cut is uncovered.
:::tip Authoritative product docs Performance Testing · viewing results · when to use which workflow. This page is the agent playbook. :::
Run Performance Tests (workflow-id: run-perf-tests) is the execution analog of Run smart smoke—for k6. Script-first: CI and local wrappers work without an agent. Soft-gate PERFORMANCE_TESTING. Does not run k6 load/volume inside /testchimp test. Run QA does write plans/smart-smoke/<branch>/related-perf-tests.json when k6/journeys exists so CI can later k6/scripts/run.sh --impacted.
When to use
- After a PR, to run related journeys (not the entire
k6/tree). - When a release is cut, to run the release git range and stamp ingest with that version.
- In CI via
k6/scripts/run.sh(optional--impactedoncerelated-perf-tests.jsonis committed) with the same env vars the playbook uses. Merge-gate jobs typically useK6_PROFILE=smokeand skip when the related-perf file is missing (do not fall through to the full suite).
Do not use it to author missing journeys (that is create-perf-tests, unless nested after the release sufficiency ask). Do not point it at production unless policy and you explicitly allow it. Do not use it as a substitute for SmartTests.
Prompt
/testchimp run-perf-tests
/testchimp run perf
/testchimp run performance tests
/testchimp run performance tests for release 1.2.0
Synonyms: /testchimp run-perf-tests, /testchimp run perf, /testchimp run performance tests, /testchimp run performance tests for release <label> (release detail CTA).
Scope
Optional. When omitted:
- Feature / PR branch — related journeys for the change set (
select-related.sh+list-related-perf-tests: scenarios, operations, paths, parent composites). - Default branch — changes since the last
run-perf-testsrun.
Name files or a folder to override related selection. A release label (for release 1.2.0) switches the git range to prior SHA → cut SHA—not the working-tree branch tip. See Workflows intro — Scope.
Prerequisites
- Org capability
PERFORMANCE_TESTING(or trial). connect-to-test-env— resolvedBASE_URL/ backend; isolated env for load/volume.TESTCHIMP_API_KEY(and backend/ingress URLs when configured) on the k6 process, not only MCP.k6/scaffold (nestedinit-perfif missing) and at least one runnable journey—or be ready to approve nested authoring on a release.- Policy capacity numbers for any profile other than smoke. Outbound deps stubbed with realistic latency for load/volume.
Policy
Default: plans/knowledge/policies/run-perf-tests.policy.md.
Owns permitted environments, capacity model (prod VU target vs local downsample), dependency mock/latency inventory, and LLM mode. Production is rejected unless this file and the user authorize it. Smoke is the safe default (max_vus: 1).
How to use — PR / branch
-
Finish (or skip) authoring. Related selection only finds journeys that already exist.
-
/testchimp run-perf-tests(optionallyfor checkout). Approve env, profile (smokevs approvedload/volume), and dataset. -
Agent executes only through
run.sh:k6/scripts/prepare.shSEED_COMMAND=<project seed> k6/scripts/run.sh --impacted# or named files / full suite:SEED_COMMAND=<project seed> k6/scripts/run.sh journeys/foo.jsSEED_COMMAND=<project seed> k6/scripts/run.shNever bare
k6 run—no ingest, no Executions charts. Paths are relative tok6/(journeys/foo.js). Volume journeys (testTypes+volumeKind) run as a staircase so the detail page can chart volume size instead of a flat 1 VU./testchimp run QAauthors the--impactedjson on the PR. -
Open Executions → Performance Tests. Overlay a comparable prior run when dimensions match.
How to use — release
-
From the release page, paste:
/testchimp run performance tests for release <label> -
Agent fetches
get-release(cut SHA, prior SHA), builds related selection from that diff, exportsTESTCHIMP_RELEASEand the cut SHA on every wrapper run. -
Sufficiency gate (blocking ask): if nothing covers the range (empty related set, changed operations with no tags, high-priority scenarios without
PERF_TESTcoverage), it tells you what changed vs what would run and asks whether to author.- Yes — nested
create-perf-testson the same git range, then execute new + already-related tests. - No — run existing related only (or stop if none); gap recorded on the plan.
- Yes — nested
-
Review ingest on the release Performance Tests panel and Executions.
Cloud automation: Run performance tests when a release is cut.
What it does
Plan → approve → Execute → Validate → Report:
- Soft-gates capability; exports runner env (
TESTCHIMP_API_KEY,TESTCHIMP_RELEASEwhen targeting a release). - Resolves target via connect-to-test-env.
- Builds related selection; for a release, uses prior SHA → cut SHA.
- Optional nested create (release only, after you confirm).
- Seeds if the dataset requires it; runs
k6/scripts/run.sh(load then volume); expectsTestChimp perf ingest okand usuallytimeseries attach ok. compare-perf-to-baselinewhen environment, profile, dataset, LLM mode, and mock/latency profile match. CLI exits nonzero whencomparison.regressedis true. Missing/mismatched baseline is incomparable, not a pass. Thresholds are not weakened implicitly.
See also
- When to use which
- Viewing results
- Create performance tests
- Skill playbook: run-perf-tests.md
FAQ
What runs if I omit scope?
On a feature branch, related journeys for the change set. On the default branch, changes since the last run-perf-tests run. Name files or a release label to override.
How does a release run differ from a PR run?
The git range is prior SHA → cut SHA, ingest is stamped with TESTCHIMP_RELEASE, and insufficient coverage prompts nested create-perf-tests instead of silently skipping or over-authoring.
Does CI need an agent to run k6?
No. k6/scripts/run.sh is script-first (optional --impacted after run-qa writes related-perf-tests.json). Agents help pick files, environment, and nested authoring. Volume journeys dispatch via testTypes/volumeKind so Executions can chart volume size.