Postman testing framework · v4.0.1 · MIT

hephaestus

Scattered scripts, forged into one engine.

A modular API-testing framework for Postman & Newman. One engine lives inside Postman; a CLI of CI gates lives outside. You declare what a response should be — it handles the rest.

$ npm i -g hephaestus-postman-framework
143tests
464golden
18CLI gates
0deps

post-request.js
// Declare what you expect
const override = {
  expectedStatus: 200,
  maxResponseTime: 1500,

  assertShape: {
    "data.id":    "number",
    "data.email": "string",
    "error":      "absent",
  },
  assertions: {
    "data.status": { eq: "active" },
    "data.score":  { gte: 0 },
  },
  snapshot: { mode: "structural" },
};

eval(cv.get("hephaestus.v3.post"));
Two runtimes, one engine

Hot metal inside Postman. Quenched steel in CI.

The engine ships as collection data and runs where your requests run. The CLI never touches it — it reads what Newman wrote and turns each metric into a gate.

In the forge · Postman & Newman

The engine

ES modules bundled into two files, embedded in the collection and eval'd in the sandbox — engine-as-data, no plugin install.

  • One pre-request & one post-request pipeline
  • Every request carries a small override
  • Byte-stable ru / en output
newman
-r json
The quench · terminal & CI

The CLI

Zero-dependency Node tooling that reads the run report and exits non-zero on the exact thing that regressed — so the build fails for a reason.

  • 18 commands, each a CI gate
  • summary · compare · coverage · flaky
  • Provenance-signed on npm

The engine

Everything a request needs, in one config block

Each capability is opt-in and off by default — existing collections upgrade untouched.

Assertion operators

Value checks that combine per field — eq, gt, gte, matches, type, includes, absent, with soft and when.

Structural snapshots

Baselines keyed by request. strict, non-strict or structural — the last compares shape only, so volatile ids and timestamps never register as drift.

Schema & shape

Full JSON Schema via a bundled tv4, plus one-line assertShape path→type checks and per-element assertEach rules.

Security audit

Passive response checks: cookie flags, alg:none / expired JWTs, missing no-store, insecure CORS. Each emits its own failing test.

GraphQL & retries

GraphQL answers 200 even with errors[]graphql checks the real contract. retryOnStatus honours the server's Retry-After, capped.

Bilingual output

Every test name, log line and error routes through a locale catalog. ru and en ship; both are byte-locked by a golden harness.


Post-request pipeline

Seventeen modules, one shared context, a fixed order

Every response runs the same chain through a shared ctx. This is the real order taken from the engine source.

  1. 01configMerge
  2. 02normalizeResponse
  3. 03retryOnStatuscontrol · can short-circuit the run
  4. 04metrics
  5. 05extractor
  6. 06assertions
  7. 07assertEach
  8. 08assertShape
  9. 09graphql
  10. 10assertOrder
  11. 11assertUnique
  12. 12assertHeaders
  13. 13snapshot
  14. 14schema
  15. 15securityAudit
  16. 16plugins
  17. 17logger
assertion / effect module control — can short-circuit the run

retryOnStatus is the one that branches: when it decides to retry it calls setNextRequest and everything after it is skipped for that pass — so a retry never runs half a set of assertions.


Zero-dependency CLI

Eighteen commands, every one a CI gate

One binary, no dependencies, exit codes that fail the build on the specific thing that regressed.

summaryp50–p99 + SLA gate
comparediff two runs — regression gate
flakyfind assertions that flap
coverageOpenAPI coverage, min gate
benchengine overhead per request
reportself-contained HTML + trends
trendspass-rate / p95 sparklines
doctorpre-flight integrity check
mockreplay snapshots as a local API
watchre-run Newman on change
openapispec → collection (+ negatives)
docsAPI docs from test scripts
junitNewman JSON → JUnit XML
migrateclassify migration state
sync-examplessnapshots → Postman examples
init --demo60-second offline demo
generatewizard → paste-able override
paneldev panel: trends, diff, editor

Get started

Two ways in

Import the collection to run inside Postman, or install the CLI for Newman and CI. Use one or both.

01 · INSIDE POSTMAN

Import the collection

The shipped collection embeds the engine at build time. A fresh import runs offline — no fetch step, no plugin.

Quickstart guide
02 · TERMINAL & CI

Install the CLI

One binary, zero dependencies, provenance-signed on npm. Every command is a CI gate.

$ npm i -g hephaestus-postman-framework
Ship with confidence

Forge better APIs.

Every feature is opt-in, the ru output is byte-stable, and the package ships with a signed provenance attestation.