跳到正文
cccskills
免费在 GitHub 公开

postman-collections

Repairs Postman and Newman runs in CI - a reporter that never writes the HTML file the pipeline expects, a nightly job that fires requests as fast as it can until a partner API rate-limits it, or a report with one row per request when the collection asserts a dozen things between them. Authors Postman collections (requests, tests, variables, environments), runs them headless via the Newman CLI, configures reporters (cli / json / junit / html) for CI artifact upload, and drives data-driven runs from JSON / CSV iteration files. Use when HTTP API tests are authored in Postman and need to run, pace themselves, and report correctly in CI.

中文简介正在准备中。当前显示原文说明。

testland/qa星标 13(GitHub 13 + cccskills 0)
集成工具GitHub

实测评分 未实测

查看安装方法

包含的文件(23)

  • SKILL.md6.0 KB
  • .tessl-plugin/plugin.json777 B
  • evals/cascading-failure-fanout/criteria.json3.7 KB
  • evals/cascading-failure-fanout/task.md6.3 KB
  • evals/ci-junit-reporting/criteria.json4.3 KB
  • evals/ci-junit-reporting/task.md4.5 KB
  • evals/credentials-in-collection-json/criteria.json3.7 KB
  • evals/credentials-in-collection-json/task.md4.6 KB
  • evals/forked-collections-per-environment/criteria.json3.9 KB
  • evals/forked-collections-per-environment/task.md5.1 KB
  • evals/html-report-never-produced/criteria.json3.6 KB
  • evals/html-report-never-produced/task.md3.4 KB
  • evals/pricing-matrix-from-scratch/criteria.json4.5 KB
  • evals/pricing-matrix-from-scratch/task.md3.8 KB
  • evals/rate-limited-run-hangs/criteria.json3.5 KB
  • evals/rate-limited-run-hangs/task.md5.8 KB
  • evals/report-rows-name-nothing/criteria.json3.9 KB
  • evals/report-rows-name-nothing/task.md5.4 KB
  • evals/single-run-wall-clock/criteria.json4.0 KB
  • evals/single-run-wall-clock/task.md6.7 KB
  • evals/test-script-cannot-load-module/criteria.json4.0 KB
  • evals/test-script-cannot-load-module/task.md4.6 KB
  • references/newman-reference.md4.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

postman-collections

Overview

Newman is Postman's official CLI for running collections headlessly in CI (newman-readme). The shape is two-step: author the collection in the Postman app (or import an OpenAPI spec), save it as collection.json, then run newman run collection.json in CI and emit JUnit / JSON for gating.

This skill covers the headless Newman side. GUI authoring inside Postman is out of scope; its reference is learning.postman.com.

When to use

  • The repo contains *.postman_collection.json (or the team exports collections to collections/).
  • API testing is the team's primary integration-testing layer and the team is already in the Postman ecosystem.
  • A CI workflow needs newman run with structured reporter output for PR gating.

If the team uses TypeScript / JavaScript and prefers code-first authoring, evaluate tavern-testing (YAML) or karate-testing (Karate DSL) before adopting Postman/Newman - those keep tests next to source code rather than in a separate JSON artifact.

Install

npm install -g newman

(Per newman-readme.)

For per-project install (preferred for CI determinism):

npm install --save-dev newman

For the HTML reporter (external, separate install):

npm install --save-dev newman-reporter-htmlextra

Running

The canonical invocation (newman-readme):

newman run <collection-file-source> [options]

<collection-file-source> can be:

  • A local file path: ./collections/orders.postman_collection.json.
  • A Postman Cloud URL: https://api.getpostman.com/collections/....
  • A public-link URL exported from Postman.

Key flags

The flags you reach for first: -e/--environment, -r/--reporters (cli,json,junit,html), --reporter-junit-export <path>, --bail [folder|failure], and --timeout-request <ms>. The full flag table (per newman-readme) is in references/newman-reference.md.

Worked example

newman run examples/sample-collection.json \
  -e environment.json \
  -d data.csv \
  -r cli,json,junit \
  --timeout-request 5000 \
  --reporter-junit-export results.xml \
  --reporter-json-export results.json \
  --bail folder

(Adapted from newman-readme.)

Reporters

The four built-in / canonical reporters per newman-readme:

ReporterPurpose
cliTerminal output; enabled by default.
jsonFull JSON summary of every request and assertion result.
junitJUnit XML - consumable by GitHub Actions, GitLab, Jenkins.
htmlStatic HTML report; requires newman-reporter-htmlextra.

JUnit is the canonical CI choice - every major CI platform ingests JUnit XML, surfaces test counts on the run summary, and lets the team click through to per-assertion failures.

For richer per-test details (which assertion in which folder failed with which response), pair junit with json and upload both as build artifacts.

Authoring tests inside the collection

Tests live in each request's Tests tab and run in a sandboxed JS environment with pm.* globals:

pm.test('status is 200', () => {
  pm.response.to.have.status(200);
});

pm.test('body is JSON with .order_id', () => {
  const json = pm.response.json();
  pm.expect(json).to.have.property('order_id').that.is.a('number');
});

pm.test('saves order_id for next request', () => {
  pm.collectionVariables.set('order_id', pm.response.json().order_id);
});

Each pm.test('...', () => {}) call becomes one entry in the JUnit XML / JSON output - name them clearly so the CI run summary is readable.

CI integration

A GitHub Actions workflow that runs newman, exports JUnit + JSON, uploads both as artifacts, and surfaces results in the run summary - with if: always() on the upload and reporter steps so the reports survive a failing collection - is in references/newman-reference.md.

Anti-patterns

The common Newman anti-patterns and their fixes - hard-coded URLs and tokens in the collection JSON, running against production, cascading shared-state pm.test blocks, one giant 200-request collection, and missing --bail - are tabulated in references/newman-reference.md.

Limitations

  • No code-first authoring. Postman's authoring story is the GUI; the JSON file is the artifact. Teams that prefer code-first DSLs should evaluate karate-testing or tavern-testing.
  • Sandboxed JS only. Tests can't import npm packages - the pm.* sandbox provides chai / lodash / cheerio pre-loaded; for richer logic, consider Karate or Tavern.
  • No native parallelism inside one Newman run. Parallelize across CI matrix jobs, not within a single Newman process.

References

  • newman-readme - install, newman run syntax, flags, reporters, example invocation.
  • tavern-testing - YAML alternative.
  • karate-testing - DSL alternative.
  • schemathesis-fuzzing - property-based fuzzing as a complement (not replacement) for example-based collections.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

查看 testland 的全部技能

报告此技能的问题