Teams usually want the same performance check in a pipeline — with an explicit threshold that fails the build when it’s missed.
Pick a pass criterion (CLI-ready)
Postman performance tests can assert a condition on the run: if the metric misses the bar, the run fails. From the Postman CLI, that is --pass-if — exit code 1 fails a CI job.
LiftOff can’t run your terminal or GitHub Actions here. Instead, use the pass criterion builder below to choose a metric and threshold. It generates a ready-to-copy CLI command and a sample GitHub Actions workflow. Replace <collection-id> (or COLLECTION_ID) with your Coffee API Load Test ID when you use them for real.
You can also add --runner postman-cloud later if the load shouldn’t come from the CI agent.
Further reading: CLI performance runs · Simulate user traffic · product overview.
Pass criterion builder
Pick a bar you'd enforce. We generate a CLI command and a GitHub Actions snippet — you don't need to run them in this sandbox.
--pass-if "less_than(p95, 500)"
Postman CLI
postman performance run <collection-id> \ --vu-count 10 \ --duration 1 \ --pass-if "less_than(p95, 500)"
Replace <collection-id> with your Coffee API Load Test collection ID from Postman.
GitHub Actions example
name: API performance
on:
pull_request:
jobs:
performance:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Postman CLI
run: |
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
- name: Run performance test
env:
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }}
run: |
postman login --with-api-key "$POSTMAN_API_KEY"
postman performance run "${{ vars.COLLECTION_ID }}" \
--vu-count 10 \
--duration 1 \
--pass-if "less_than(p95, 500)"
Needs POSTMAN_API_KEY as a repo secret and COLLECTION_ID as a variable. This sandbox does not run the workflow.
Validate stays disabled until the reason field is filled in.
Finish the interactive block above before validating.