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日