Get started

Quickstart

Import the shipped collection, set your defaults, add a request, and run — inside Postman or through Newman in CI. No build step, no plugin, no network.

1 · Prerequisites

To run inside Postman you need nothing but the app. The engine ships embedded in the collection, so there is no package to install and no code to fetch.

The command-line gates come from a single zero-dependency package. Install it globally, or call it with npx and skip the install:

$ npm i -g hephaestus-postman-framework
No Node for Postman. Running the framework inside Postman needs only the desktop app — Node, Newman and the CLI matter only when you take the same collection into CI.

2 · Import the collection

The shipped collection embeds the engine at build time, so a fresh import is fully self-contained and runs offline.

In Postman, choose Import and select the file:

# from the repo
collection/hephaestus-template.postman_collection.json

The engine lives in two collection variables — hephaestus.v3.pre and hephaestus.v3.post — which the import brings with it. There is no fetch step and no plugin to enable.

Adding to an existing collection? Copy those two collection variables across, then wire each request to the engine as shown in step 4.

3 · Set defaults

Open Collection Variables and set hephaestus.defaults to a JSON object. It applies to every request in the collection; any request can override a single key without touching the rest.

A minimal starting point:

{
  "baseUrl": "https://api.example.com",
  "locale": "en",
  "contentType": "json",
  "auth": { "enabled": false, "type": "none" }
}
Full template. An annotated version ships at setup/defaults.json. Every key it accepts is listed in the Config reference.

4 · Add a request

Each request carries a small override block, then one line evaluates the engine. That line never changes between releases — only the override above it does.

In the request's Tests tab (the post-request pipeline):

const override = {
  expectedStatus: 200,
  maxResponseTime: 1000,
  assertShape: {
    "data.id":   "number",
    "data.name": "string",
    "error":     "absent",
  },
};

eval(pm.collectionVariables.get("hephaestus.v3.post"));

The Pre-request tab follows the same shape, ending in eval(pm.collectionVariables.get("hephaestus.v3.pre")).

Copy a starting point. Paste-ready scripts live at templates/method.pre-request.js and templates/method.post-request.js — edit only the override section.

5 · Run & verify

Inside Postman, hit Send. Open the console (View → Show Postman Console) to read the engine output; the Test Results tab lists every assertion, and a failure names the exact field and why.

To run the same request from a terminal, point Newman at the collection with the CLI reporter:

$ newman run collection.json -e env.json -r cli
Byte-stable output. Every test name and log line routes through a locale catalog; the en and ru output are locked by a golden harness, so the reporter reads the same on every machine.

6 · Run in CI

In CI, run Newman with the JSON reporter, then hand the report to the CLI. Each command reads what Newman wrote and exits non-zero on the one thing that regressed — so the build fails for a reason.

newman run collection.json \
  -e env.json \
  -r json \
  --reporter-json-export run.json

Then gate on the run. The p95 latency gate and the run-to-run regression diff are two independent exit codes:

# p95 SLA gate — non-zero if p95 > 1500 ms
hephaestus summary run.json --sla=1500

# regression gate — diff two runs
hephaestus compare before.json run.json
Zero dependencies. The CLI is one binary with no install tree of its own, provenance-signed on npm. There are eighteen commands, each usable as a CI gate.

60-second offline demo

Not ready to wire up a real API? One non-interactive command scaffolds a complete demo — a collection, an environment and a README — with no account, no API key and no network.

$ npx hephaestus init --demo

The collection carries its own recorded snapshots, so hephaestus mock serves those responses back and Newman runs green:

# terminal 1 — serve recorded responses
hephaestus mock \
  hephaestus-demo/demo-collection.json \
  -p 4010

# terminal 2 — run the tests
newman run \
  hephaestus-demo/demo-collection.json \
  -e hephaestus-demo/demo-environment.json

The result is 5 requests and 35 assertions, all green — including a negative test whose expected result is a 404. Every request is copy-pasteable into a real collection, one headline feature at a time.

Feed it onward. Re-run with -r json --reporter-json-export run.json, then try hephaestus summary, report and docs against the same run.

What's next

You are up and running. From here, go deeper on the engine, look up any config key, or read the source.