Beta feature

Run a performance test using the Postman CLI

With performance tests, you can simulate user traffic and observe how your API behaves under load, identifying potential issues that affect performance. You can use the Postman CLI to trigger performance tests for specified collections, all within your CI/CD pipeline. Your team can use your tests to automatically catch performance issues during the deployment process. Depending on whether the performance test passes or fails, you can push or roll back your changes.

With the postman performance run command, you can configure a performance test for a collection. Add the command into your CI/CD script to integrate performance tests into your workflow. Postman recommends replacing your collection ID and API key with variables.

The Postman CLI triggers the performance test using the postman performance run command. The performance test runs against the specified collection according to your performance test configuration. Then the Postman CLI makes the test results available in the performance test results in Postman.

Run a performance test within your CI/CD pipeline

  1. Click Collection iconCollection icon Collections in the sidebar, then select a collection you’d like to run a performance test for.

  2. Click Run iconRun icon Run.

  3. Click the Performance tab.

  4. Configure the performance test for your collection. Your configuration settings are reflected in the performance command that you can copy from the Postman app.

  5. Under Run, select via the CLI.

  6. Under Install Postman CLI, click Copy iconCopy icon Copy to clipboard to copy the Postman CLI installation command.

  7. Under Run the performance test, click Add API key. Do one of the following:

    • Click Generate Key to create a new API key. Enter a name for the API key and click Generate. Click Copy iconCopy icon Copy to copy the key and save it somewhere safe.
    • Click Use Existing Key and enter a valid API key.
  8. Click Insert Key.

  9. Click Copy iconCopy icon Copy to clipboard to copy the login and performance commands.

  10. Paste the Postman CLI installation, login, and performance commands into your CI/CD script. This process depends on your CI tool.

The following example shows how to use the Postman CLI GitHub Action to run a performance test:

name: API Testing

on: push

jobs:
  performance:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run performance test
        uses: postmanlabs/postman-cli-action@v1
        with:
          command: 'performance run ${{ vars.COLLECTION_ID }}'
          api-key: ${{ secrets.POSTMAN_API_KEY }}

Last modified: 2026/01/16