Test with the Postman CLI

View as Markdown

Use the Postman CLI to run API tests from your command line or CI/CD pipeline. You can run collection tests locally, trigger monitors, validate performance tests, and generate collection run reports that your team can review in Postman or in your pipeline artifacts.

The Postman CLI is useful when you want API testing to run automatically with every build, before a deployment, or from a script outside the Postman app. To get started, install the Postman CLI. If your workflow sends results to Postman or runs a cloud-backed test, sign in to Postman with the CLI.

Run collections

Use the Postman CLI to run collections locally or in CI/CD. A collection run sends the requests in your collection, runs your tests, and can send run results to the Postman cloud.

Run monitors

Use the Postman CLI to trigger monitor runs from your CI/CD pipeline. Monitor runs help your team catch regressions and configuration issues during deployment workflows. You can run monitors against public APIs in the Postman cloud, or use runners to monitor internal APIs from your private network.

Run performance tests

Use the Postman CLI to run performance tests for Postman Collections locally or as part of your CI/CD pipeline. Performance tests simulate user traffic and help you detect performance regressions before changes reach production.

Generate collection run reports

Use Postman CLI built-in reporters to generate collection run reports. You can view results in the terminal or export reports in formats such as JSON, JUnit, and HTML.