***

title: Run API tests in your CI/CD pipeline using Postman
approved: 2026-03-26T00:00:00.000Z
slug: docs/tests-and-scripts/run-tests/run-tests-with-ci-cd
max-toc-depth: 2
topictype: tutorial
-------------------

With continuous integration and continuous delivery (CI/CD), the goal is to deliver frequent software updates that provide value for users. At the same time, it's important to maintain software quality. Running API tests automatically during the build process helps ensure that every code change is ready for production.

The [Postman CLI](/docs/postman-cli/postman-cli-overview/) enables you to run your test collections, monitors, flows, and more as part of your CI/CD pipeline. With the Postman CLI, you can run your tests and monitor their results every time there's a push to your code repository.

## Configure Postman CLI test runs

To run tests as part of the CI/CD pipeline, first create a [Postman Collection](/docs/collections/collections-overview/) with the tests you want to run. Then use Postman to generate a code snippet you can include in your CI/CD pipeline configuration. The [Postman CLI](/docs/postman-cli/postman-cli-overview/) runs your tests each time the pipeline runs. This enables you to push or roll back your changes based on the test results.

To configure your CI/CD pipeline to run a collection, do the following:

1. Click <img alt="Items icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon" width="20px" /> **Items** in the sidebar.
2. Click **Collections**, select a collection, then click the collection or folder you want to run in your CI/CD pipeline.
3. Click <img alt="Run icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-run-stroke.svg#icon" width="20px" /> **Run**.
4. Click the **Functional** tab, then click **Automate runs via CLI**.
5. Under **Run on CI/CD**, click **Configure command**.
6. Select the collection you want to run and an optional [environment](/docs/sending-requests/variables/managing-environments/). You can add multiple collections each associated with their own environment. Also select your CI/CD provider and operating system.
7. Click **Copy Postman CLI Command** to copy the code. Then add this to your CI/CD pipeline configuration.

To learn more about configuring the Postman CLI in your CI/CD pipeline, see [Postman CLI commands and options overview](/docs/postman-cli/postman-cli-options).
