Skip to main content

/testchimp import-perf-tests — Import existing performance tests

In brief: Import-perf-tests migrates an existing performance suite into the mapped SmartTests k6/ folder—k6 unchanged, Locust/JMeter/Gatling/Artillery best-effort translated—then adds TestChimp metadata, scenario links, and tagging.

Import Performance Tests is a One-Off catalog workflow (workflow-id: import-perf-tests). Run it standalone or nested under /testchimp init-perf with one shared approval. There is no import-perf-tests.policy.md — decisions are interactive in the playbook. Load/volume profiles stay on run-perf-tests policy; source VU/user counts are not copied into k6 load profiles.

Canonical prompt:

/testchimp import-perf-tests <existing perf tests folder>
/testchimp import perf tests locust

Synonyms: /testchimp import-perf-tests, /testchimp import perf tests <folder>.

When to use it

  • You already mapped a tests folder in TestChimp and have Locust, k6, JMeter, Gatling, Artillery, or similar scripts elsewhere in the workspace.
  • You ran init-perf and skipped importing an existing suite.
  • You want journeys under k6/ with export const testchimp metadata, #TS-… scenario links, and path/operation tags so related selection and coverage work.

Do not use it to author greenfield journeys from scenarios (that is create-perf-tests) or to copy Locust user counts into load.js. If k6/ does not exist yet, this workflow nests init-perf rather than replacing it.

How to use

  1. Point at the existing suite: /testchimp import-perf-tests locust (or a folder path).
  2. Approve layout, translation (if not already k6), scenario-link mapping, and CI choice (new k6 job vs leave/replace the legacy job). Default profile remains smoke.
  3. Composite membership is a separate prompt—same rule as create-perf-tests.
  4. After import, run related tests with /testchimp run-perf-tests once env + capacity policy exist.

Catalog overview: Performance testing workflows.

What it does

  1. Discover — framework, source folder, mapped SmartTests root (.testchimp-tests) and target k6/.
  2. Scaffold — nested init-perf when k6/ is missing (profiles, scripts, reporter prepare).
  3. Import / translate — k6: move/align without changing request logic. Other frameworks: best-effort translate to k6 journeys (k6/journeys/<id>.js). Composites only after an explicit membership/weight prompt.
  4. Metadataid, kind, testTypes, scenarios, paths, operations; per-request k6 tags.name from Locust @tag / JMeter transaction names.
  5. Scenario links — keep existing TMS/locust names; add real #TS-<n> via get-test-scenarios --external-ids or high-confidence heuristic matches against plans/scenarios/.
  6. CI — ask whether to create a separate k6 job, leave the legacy perf job, or replace it; default K6_PROFILE=smoke.
  7. Optional smokek6 inspect + run-journey.sh on smoke only; blocked until connect-to-test-env / env strategy exists.

Nested under init-perf

When init-perf finds a perf suite outside k6/, it can nest this playbook in the same plan and workflow_execution_id. No second Plan → approve cycle.

FAQ

Does import rewrite existing k6 scripts?

No—existing k6 request logic stays as-is. The agent aligns folder layout, reporter wrappers, and export const testchimp metadata under the mapped k6/ tree.

What about Locust or JMeter?

Best-effort translation to k6 journeys, preserving HTTP method/path/checks. Source VU or Locust user counts are not copied into load profiles without a separate capacity approval.

Can I run import-perf-tests after skipping it in init-perf?

Yes—use /testchimp import-perf-tests <folder>. Nested under init-perf it shares one approval with the init-perf plan.