Run collections in the Postman VS Code extension

Pankaj Khandelwal

The Postman VS Code extension serves as a developer’s indispensable ally, seamlessly integrating the robust capabilities of the Postman API Platform directly into the VS Code environment. By bringing advanced features like the Postman Console, documentation, and dynamic variable support into the code editor, it empowers developers to efficiently design, test, and collaborate on APIs with unparalleled ease and speed.

API development just got a power boost with the latest feature added to the Postman VS Code extension—the Collection Runner. The Collection Runner enables you to run a collection’s requests in a specified sequence to test the functionality of your API. It logs your request test results and can use scripts to pass data between requests and alter the request workflow.

Configuring a collection run

Users can configure the requests in a collection or a folder by clicking on the Run button in the collection or folder Overview tab. To run requests in a collection or folder, follow these steps: first, select Collections in the sidebar and choose the desired collection or folder, and select Run.

Users can associate their collection with an environment, selecting it using the environment selector at the top right or from the sidebar. Various configuration options are available, including setting the number of iterations, specifying delay intervals between requests, persist responses for a session, and other advanced settings.

The sequence of request execution can be modified by dragging requests. After configuring your settings, select Run with the collection or folder name.

Configuring and running a collection
Configuring and running a collection

Debugging run results

During manual collection runs in the Postman VS Code extension, real-time results of request executions and test outcomes are provided, showing details such as the source of the collection run, selected environment, number of iterations, total duration, etc.

In the Collection Runner results, users can explore the run further by selecting a specific request to view comprehensive information about the request, including headers and body. Filtering options are available via Passed, Failed, or Skipped tabs, with the All Tests tab showing all requests. Users can navigate through results for specific iterations, access a list of past runs, and return to the full results as needed.

Run results page of a collection
Run results page of a collection

Viewing run history

Each collection has a Runs tab you can use to view past runs, scheduled runs, and performance runs. You can also view details such as test counts and average response times. The Runs tab has controls to select how many collection runs to view, and limit the displayed runs to those from selected users, of a selected status, and either from the Collection Runner or the Postman CLI.

Runs tab showing past runs of a collection
Runs tab showing past runs of a collection

The Collection Runner in the Postman VS Code extension helps in streamline their API testing workflow. With iterative execution, insightful reporting, and seamless environment integration, it’s a tool designed to enhance efficiency and accuracy in every testing cycle.

If you haven’t already tried it out yet, you can install the Postman VS Code extension from the VS Code marketplace.

Try Postman now

What do you think about this topic? Tell us in a comment below.


Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 thought on “Run collections in the Postman VS Code extension

  • Avatar

    Very nice!
    Question, I’m concerned about my Postman queries and examples of being stored in the cloud. I rather my Postman collections (consisting of queries and examples) only be stored locally. My collections would contain signatures of my API that I would only like stored locally.

    If I use this Postman VS Code extension, will my collections be stored locally or in Postman’s cloud storage?