Test by Design
← All work

Scenario suites in Postman, run by Newman

API suites written as scenarios: one ordered chain of requests per business flow, run in Postman and in CI with Newman.

A design note: the shape, when it is the right one, and what it costs.

One scenario, in order Collection runner or Newman, in CI request 1 pre · post request 2 pre · post request 3 pre · post request 4 pre · post request 5 pre · post setNextRequest() — loop, or branch One break request 1 pre · post request 2 pre · post request 3 fails here request 4 never runs request 5 never runs Each request needs what the one before it produced, so a failure in the middle is not one red test — it is every test after it.

Scroll sideways to see the whole diagram.

The opposite of the worker pool: here the order is the thing being tested.

What a scenario’s scripts do

Nothing hardcoded

Every value is generated at send time, including any signature the API expects.

Shared helpers

Kept in a collection variable, because Postman scripts cannot import files.

Data-driven runs

A CSV or JSON file turns one scenario into a table of cases.

Flow control

setNextRequest() for loops and branches — a jump that only works in the runner.

When it is right, and what it costs

The cost
One broken request stops every request after it.
Why retries do not help
The failure is a broken precondition, not a flaky call. Retrying a request whose input is already wrong returns the same wrong answer.
When it is still right
When the flow is what is under test. Then the order is the point, not a cost.
The alternative
Tests that set up their own data and run side by side, as the suites on the front page do. The sequential shape still suits the flow tests.
← All work
Test by Design