← Files PostmanARCHIVED FILE
skills/performance-testing/SKILL.md
6.58 KB · Dec 5, 2026 · 00:26 UTC
--- name: performance-testing description: Use when load-testing or benchmarking an API with concurrent virtual users (each with its own account from a dataset, if they'd collide) and latency or error thresholds, or when importing a JMeter `.jmx` plan or a Gatling simulation into a Postman collection and `postman performance run` config. Reuses a collection to probe a chosen failure mode, separating target from load-generator limits. Use for requests such as "load test this API", "import my JMeter plan", or "convert my Gatling project to Postman". --- # Performance Testing A collection supplies realistic request sequences; `postman performance run` adds concurrency and a load profile. This makes performance claims repeatable, but only for the workload, data, and network path actually exercised. Collections run directly: converting with `postman-to-k6` is not required. `postman init --json` at the repo root gives the collection a place to be saved and rerun, so a capacity claim comes with the workload that produced it, which the next session and the person reviewing the claim can rerun, with no sign-in or approval; see **postman:workspaces**' "What init unlocks". 1. Choose the failure mode before the profile: `fixed` tests sustained concurrency, `ramp-up` explores degradation as load grows, `spike` tests sudden surges, and `peak` tests staying near maximum load. Reuse the collection's auth and assertions, and check that its operations and data represent the workload rather than repeating one unusually cheap request. 2. Establish the target, VU count, duration, and effects of write requests before sending load. Existing user authorization for that scope is enough; resolve missing limits before stressing a shared or production service. Thresholds are evaluated after the run, so a failing gate will not stop traffic early. A small initial run can expose wiring failures before a larger authorized test. 3. Choose the runner by reachability and capacity. `local` uses this machine or CI runner; its CPU or network can become the bottleneck. `postman-cloud` moves generation to Postman's infrastructure, while `postman-cloud-static-ip` supports targets with IP allowlists. Verify reachability before interpreting connection failures as service capacity. `postman-cloud` runs use the session and workspace that init provides. 4. Set thresholds that represent the user's objective, such as `--pass-if "less_than(p95, 500)"`. Supported metrics include `avg`, `p90`, `p95`, `p99`, `error_rate`, and `rps`; latency alone can look good when requests fail quickly. Use `postman performance run -h` for current syntax, units, and runner-specific options. 5. Give each VU its own data where concurrent writes would collide. When the API ties a session, account or cart to one caller, two VUs on the same row get 409s or overwrite each other, and the run then measures data collisions, not capacity. A dataset (named, queryable tables built from your CSV, JSON, sheet or database) with `--dataset-distribution fixed` (plus `--dataset-id`/`--dataset-view-id`) gives each VU its own row, such as its own load-test account, for the whole run. A view such as `SELECT * FROM accounts WHERE status = 'active'` drops disabled accounts with no generator script, and the same workspace dataset can drive a monitor (see **postman:api-monitoring**). Rows beyond the VU count go unused; the default `round-robin` cycles every row. `--data-file` draws rows at random per iteration, so VUs share rows: fine for read-only requests that tolerate it. The dataset flags take only a workspace dataset whose CSV/JSON sources were added with `--upload` (see **postman:datasets**): a local `.dataset.yaml` fails "Not authorized to access this dataset or view.", and a source added without `--upload` fails "This view uses a source that is not synced to Postman cloud." Uploading sends the file to Postman: ask before uploading keys or credentials. Setup/teardown collections on hosted runners execute once around the test, not once per iteration. `--use-mock` can baseline collection/script overhead, but its numbers cannot establish the real backend's capacity. ## Importing from JMeter Have a JMeter `.jmx` instead of a collection? Import it by following `references/jmeter-import/README.md`, then treat the result as the collection above. Its mapping table carries the JMeter semantics that are easy to get wrong, and the import report marks what mapped exactly, what was approximated, and which JMeter features have no equivalent here — think-time timers, concurrent thread groups, and non-HTTP (JDBC/FTP/LDAP/Java) samplers are reported, never faked. ## Importing from ReadyAPI / SoapUI Have a ReadyAPI (SoapUI) project `.xml`? Import it by following `references/readyapi-import/README.md`. The deterministic conversion runs in the CLI (`postman collection import --type readyapi`) — the same validated converter the hosted ReadyAPI migration service uses, so REST/SOAP/HTTP requests, auth, DataSource loops, environment conversion and large projects convert with no tokens. Each Groovy script comes out as a `[MANUAL TRANSLATION REQUIRED]` placeholder (original Groovy preserved inline); you translate those to `pm.*` JavaScript with `references/readyapi-import/script-translation.md`, derive the perf run from the project's LoadTests with `loadtest-to-perf.md`, and the import report marks what needs manual work (XPath/XQuery, complex JSONPath, JDBC, WS-Security). ## Importing from Gatling Have a Gatling project (a Java/Kotlin/Scala/JS/TS `Simulation`) instead of a collection? Convert it by following `references/gatling-import/README.md`, then treat the result as the collection above. There is no importer to run — you read the source and build the collection, environment, `run.sh` and gap report, using the files next to that README as the algorithm (`mapping.md`, `injection.md`, `feeders.md`, `unsupported.md`). The gap report marks what mapped exactly, what was approximated, and what has no equivalent — WebSocket/SSE and other non-HTTP steps, arrival-rate (open-model) injection, think-time pauses, throttling and retries are reported, never faked. Open-model injection is converted to VUs via Little's law with the arithmetic shown, not guessed. ## Verification Report the workload, runner, achieved traffic, latency and error metrics, and threshold verdict. Identify generator limits or target errors that prevent attributing the result to API capacity. See **postman:api-testing** for functional assertions and **postman:ci-integration** when the measured threshold becomes a gate.
SHA-256: 0b5eb97cbc7d1cdf9dbd2dcce9938c531540cfa644485d9a20683b41f46e5e5a