rq.info object provides metadata about the current script execution context. It contains information about the request being executed, the current iteration (when running collections), and the event type.
Methods
rq.info.requestId
Type: string
The unique identifier of the request being executed.
Example:
rq.info.requestName
Type: string
The name of the request being executed.
Example:
rq.info.eventName
Type: "prerequest" | "postresponse"
The type of script event currently executing. Returns "prerequest" for pre-request scripts and "postresponse" for post-response scripts.
Example:
rq.info.iteration
Type: number
The current iteration index when running a collection with the Collection Runner. The index is 0-based, meaning the first iteration is 0, the second is 1, and so on.
For single request executions (not part of a collection run), this value is 0.
Example:
rq.info.iterationCount
Type: number
The total number of iterations configured for the collection run. For single request executions, this value is 1.
Example:

