DevNet Associate (DEVASC) v1.0Understanding and Using APIsMedium

A developer is performing API testing using Postman. They have a collection of requests that need to be executed sequentially, where the output of one request (e.g., an authentication token) is required as input for a subsequent request. Which Postman feature is best suited for this scenario?

  1. AEnvironments
  2. BTests (Post-response scripts)
  3. CCollection Runner
  4. DPre-request Scripts
Show answer & explanation

Correct answer: C. Collection Runner

The Collection Runner in Postman is specifically designed to execute multiple requests in a collection, or even multiple iterations of a collection, in a defined sequence. It allows for managing variables that can be passed between requests, making it ideal for chained API calls.

Why the other options are wrong

  • A. Environments are for managing different sets of variables (e.g., dev, prod URLs), not for sequencing requests or passing data between them dynamically.
  • B. Tests (post-response scripts) run after an individual request and are used to assert responses or extract data, but the Collection Runner is needed to sequence the execution of multiple requests.
  • D. Pre-request scripts run before an individual request and are used to set up variables or conditions for that specific request, not to sequence multiple requests.

Postman Collection Runner

A Postman feature that allows executing a sequence of requests within a collection, often used for automated testing, data-driven tests, and chaining requests where outputs become inputs.

  • Executes requests in a defined order.
  • Supports iteration over data files.
  • Enables passing data between requests using environment or collection variables.

Memory trick: Postman: Collections Run, Environments Serve, Scripts Test.

More Understanding and Using APIs questions