Performance Testing

作者 postmanlabs67cff8f385d8无许可证收录于 2026年10月8日更新于 2026年10月8日

Load-tests a collection with concurrent virtual users, a chosen load profile, and pass/fail thresholds on latency or error rate — run locally or on Postman's cloud runners. Use when the user asks to "load test this API," "run a performance test," "check how this holds up under load," or "benchmark this collection." Covers `postman performance run`. This generates real traffic against a real target — confirm the target and scale before running, the same way any action with effects outside this session gets confirmed.

AI 生成的概览

使用虚拟用户、负载配置和通过/失败阈值运行 Postman 集合负载测试。

功能
该技能说明如何使用 performance run 命令对 Postman 集合进行负载测试,涵盖负载配置(fixed、ramp-up、spike、peak)、运行器选择(local、Postman 云端、带静态 IP 的云端),以及基于 p95 延迟、错误率和每秒请求数等指标的通过/失败门槛。它还涉及 mock 目标、前置与后置集合,以及由数据集驱动的迭代数据。它产出的是指导与运行配置而非文件,并强调在产生真实流量前先确认目标、虚拟用户数和持续时间。
适用场景
当有人要求对 API 做负载测试、运行性能测试、对集合做基准测试,或检查服务在高负载下的表现时使用。它适用于规划或解读 Postman 性能运行,包括选择负载配置和运行器。
运行要求
需要支持 performance run 的 Postman CLI 和一个 Postman 集合;云端运行器需要 Postman 云端访问权限,数据集驱动的运行需要 Postman Dataset。需要能访问目标服务的网络,且该技能不附带脚本。

Performance Testing

Overview

performance run <collectionId> is not collection run with more iterations — it's a dedicated load-test mode: many virtual users hitting the collection concurrently for a set duration, shaped by a load profile, scored against thresholds you define, on infrastructure you choose. The collection under test is authored the normal way — see the collection-schema-v3 skill if it needs edits before the load test is meaningful (e.g. an assertion that would fail every VU's request identically).

Core knowledge

  • Load profile is what you're actually testing. fixed holds steady concurrency (does this hold up at N users, sustained); ramp-up increases gradually (where does it start to degrade); spike bursts suddenly (does a sudden surge break it); peak sustains near-maximum load (does it survive staying there). Pick based on the failure mode being probed, not by default.
  • --runner chooses where load originates. local runs from the current machine/CI runner — bounded by its own resources, fine for internal or low-scale targets. postman-cloud runs from Postman's infrastructure — needed for realistic external-scale load, or once local resources would cap the achievable VU count. postman-cloud-static-ip is the same, from a static-IP range — needed when the target allowlists by IP.
  • --pass-if "less_than(p95, 500)" turns a load test into a gate. Metrics: avg, p90, p95, p99, error_rate, rps. Checked after the run completes, not enforced live — a bad configuration still generates its full load before the gate fails.
  • --use-mock points the test at a mock instead of a real backend — for load-testing collection/script logic itself, or to baseline mock-only latency and isolate app/network slowness from what the mock adds.
  • --setup-collection/--teardown-collection (cloud runner only) run once before/after the whole test — for provisioning or cleanup, not per-iteration setup.
  • --dataset-id/--dataset-view-id drive iteration data from a Postman Dataset instead of a flat --data-file; --dataset-distribution controls whether rows are spread round-robin, fixed, or randomly across VUs.

Critical Rules

  1. Running this against a real, non-mock backend generates real load with real consequences — confirm the target, VU count, and duration with the user before running, the same way any action with effects outside this session gets confirmed. Default to a low --vu-count and short --duration for a first run against anything live, or point it at a mock (--use-mock) when the goal is testing the collection, not the backend.
  2. A --pass-if gate doesn't stop the load early. The full VU count and duration run regardless of whether the threshold will ultimately pass — plan for that cost, don't assume a failing gate means less traffic was sent.
  3. Cloud runners come from Postman's IP ranges. Before assuming a postman-cloud run will reach a target, check whether it's IP-allowlisted — use postman-cloud-static-ip if so, rather than discovering the mismatch as a wall of connection failures.

Verification

State the actual metrics the run produced (p95, error rate, rps — whatever the --pass-if checked, plus the ones it didn't) and whether the gate passed, not just that the run completed. State which runner actually executed it (local/postman-cloud/postman-cloud-static-ip) — that determines whether the numbers reflect the target's real-world reachability or only local-network conditions.

来源与署名

来源:postmanlabs/postman-plugin位于skills/performance-testing提交67cff8f

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 postmanlabs/postman-plugin 的技能

Flows

postmanlabs

通过命令行操作 Postman Flows:列出、运行、触发、部署、更新并调试流程及其运行记录。

DevOps & Cloud2026年10月8日

Ci Integration

postmanlabs

将 Postman CLI 检查作为独立的通过/失败门禁加入 CI 流水线。

DevOps & Cloud2026年10月8日

Api Testing

postmanlabs

Runs tests against an API from the command line — a single ad-hoc request, a full collection of pm.test assertions, or matching real captured app traffic against a collection contract. Use when the user asks to "test this endpoint," "run this collection," "check the API still works," or "verify my app's requests match the contract." Covers `postman request`, `postman collection run`, and `postman application test`. Depends on bootstrap when the target is a cloud collection or workspace-bound environment; a bare URL or local collection needs nothing from bootstrap.

待分类2026年10月8日

Api Monitoring

postmanlabs

Creates, schedules, and manages Postman Monitors — recurring checks against a live API — triggers ad hoc runs, inspects job/run history to diagnose failures, and hosts self-hosted execution runners for monitors on a private network. Use when the user asks to "set up a monitor," "run this monitor now," "check monitor results," "pause/resume a monitor," or "set up a runner for our internal APIs." Covers `postman monitor` (create, update, delete, list, get, pause, resume, run, jobs, runs) and `postman runner` (start, list, regions).

待分类2026年10月8日

Api Mocking

postmanlabs

在本地或云端创建并运行模拟 API 后端,支持场景与状态码覆盖以便测试。

Software Development2026年10月8日

Api Engineer

postmanlabs

指导 API 工程工作,涵盖契约设计、实现、模拟、测试、文档与部署。

Software Development2026年10月8日