Rundown

After execution you receive a detailed Rundown. It contains everything about what happened in an execution, so you can run more assertions on top of the run.

Rundown(
    val stepReports: List<StepReport>,
    val mutableEnv: PostmanEnvironment<Any?>,           // pm.environment scope
    val collectionVariables: PostmanEnvironment<Any?>,  // pm.collectionVariables scope
    val globals: PostmanEnvironment<Any?>)              // pm.globals scope

StepReport(
    step: Step,
    requestInfo: Either<RequestFailure, TxnInfo<Request>>? = null, (1)
    preStepHookFailure: PreStepHookFailure? = null,
    responseInfo: Either<ResponseFailure, TxnInfo<Response>>? = null,
    postStepHookFailure: PostStepHookFailure? = null,
    pollingFailure: PollingFailure? = null, (2)
    pollingReport: PollingReport? = null, (3)
    exeTimings: Map<ExeType, Duration>, (4)
    envSnapshot: PostmanEnvironment<Any?> (5)
)
1 Either type from the VAVR library (docs.vavr.io/#_either) represents either of two states, used here for error or success
2 Captured when polling fails due to timeout or request error
3 Captured on successful polling completion, containing attempt count, duration, and responses
4 Execution timing metrics for each sub-step of the step procedure (PRE_REQ_JS, HTTP_REQUEST, etc.)
5 Snapshot of Environment at the end of each step execution; compare with previous/next snapshots to see what changed in this step

Rundown has many convenient methods to ease applying further assertions on top of it. Check out its IDE Debugger view.

toJson() — Structured JSON Serialization

Rundown can be serialized to structured JSON using toJson(), with a Verbosity parameter to control detail. This output is the Context Information an agentic Node consumes, and is also useful for logging and diagnostics.

val json = rundown.toJson()                    // STANDARD (default)
val json = rundown.toJson(Verbosity.SUMMARY)   // Quick health check
val json = rundown.toJson(Verbosity.VERBOSE)   // Full debugging detail
String json = RundownJsonWriter.toJson(rundown);
String json = RundownJsonWriter.toJson(rundown, Verbosity.VERBOSE);

Verbosity levels:

  • SUMMARY — Counts, success flags, first unsuccessful step report (step name + failure type/message only). Ideal for quick pass/fail checks.

  • STANDARD (default) — Summary + all step reports with step identity, request method/URI, response status code, execution timing metrics, and failure details. No HTTP bodies.

  • VERBOSE — Everything: HTTP headers, request/response bodies, environment snapshots per step, execution timing metrics, polling details, stack traces, and the final mutable environment.

Other examples in action: PokemonTest.java