Init Performance Testing
In brief: /testchimp init-perf copies portable k6 assets into the mapped tests root, ignores k6 in Playwright, seeds perf policies, and optionally nests import-perf-tests when an existing suite lives outside k6/.
:::tip Authoritative product docs
Why this exists and how k6/ is laid out: Performance Testing · organization. Catalog overview: Performance testing workflows. This page is the agent playbook.
:::
One-Off catalog workflow (workflow-id: init-perf). Soft-gate PERFORMANCE_TESTING (Growth / free trial). Nested automatically under create-perf-tests or import-perf-tests when k6/ is missing (same plan, one approval).
When to use
- This repo has no
k6/tree under the mapped tests root yet. - You are about to author or import performance tests and Playwright must ignore k6 files.
- Default
run-perf-tests/create-perf-tests/upkeep-perfpolicies are not on disk.
Do not use it to raise VUs, rewrite journeys, or run a load test. That is run-perf-tests after you have approved capacity. Re-run only when the scaffold itself is missing pieces (not on every PR).
Prompt
/testchimp init-perf
No optional scope—this is workspace bootstrap, like /testchimp init for functional QA.
Prerequisites
- Mapped tests folder with
.testchimp-tests. - Org capability
PERFORMANCE_TESTING(or active free trial). k6binary on the machine that will later execute (init tells you to install k6 if missing).connect-to-test-envis not required to scaffold; it is required before any real run.
Policy
Seeds (when missing):
plans/knowledge/policies/run-perf-tests.policy.mdplans/knowledge/policies/create-perf-tests.policy.mdplans/knowledge/policies/upkeep-perf.policy.md
Replace capacity placeholders (prod VU target, local downsample, dependency mock inventory) before non-smoke execution. Init-perf does not invent those numbers.
What it does
Plan → approve → Execute:
- Resolves the SmartTests root (
.testchimp-tests). - Copies portable
k6/assets if missing (journeys/,composites/,profiles/,datasets/,lib/,scripts/). Does not overwrite existing journeys, manifests, or policy decisions. Ifk6/already exists, adds missing scaffold files (lib/volume-size.js,lib/dataset.js,scripts/run.sh,scripts/suite-worklist.py,scripts/run-volume-staircase.sh,profiles/volume.jshonoringK6_VOLUME_STEPS). Clients executek6/scripts/run.sh. - Patches Playwright
testIgnorewith'**/k6/**'. - Runs
k6/scripts/prepare.shso@testchimp/k6latest lands in gitignoredk6/lib/(never vendor the reporter; never pin a semver). - Confirms
k6 version. - Appends a Performance testing note to
ai-test-instructions.md(permitted env, seed/teardown, mock inventory)./testchimp testwritesrelated-perf-tests.jsonwhenk6/journeysexists; it does not execute load/volume. - Offers nested
import-perf-testsif Locust/JMeter/Gatling/Artillery/k6 already lives outsidek6/. - Shell-checks scripts and
k6 inspecton the example journey. Does not run load/volume.
See also
FAQ
When should I run init-perf?
Once per repo before authoring or importing k6 tests, or nested under create-perf-tests / import-perf-tests when k6/ is missing.
Does init-perf run a load test?
No. It inspects the example journey under smoke. Load and volume wait until absolute settings are approved in policy.
What if I already have Locust or JMeter?
Init-perf can nest import-perf-tests in the same plan and approval when a suite exists outside k6/.