mirror of
https://github.com/Postman-Devrel/postman-claude-code-plugin.git
synced 2026-04-16 10:29:58 +00:00
1.3 KiB
1.3 KiB
description
| description |
|---|
| Run Postman collection tests using the CLI |
Run Postman collection tests to verify your API endpoints.
Step 1: Find Collections and IDs
List collection folders and look up their cloud IDs:
ls postman/collections/
cat .postman/resources.yaml
The cloudResources.collections section maps local collection paths to cloud IDs.
If no collections found, tell the user and stop. If one collection, use it directly. If multiple, list them and ask which to run.
Step 2: Run the Collection
Run by collection ID (from .postman/resources.yaml):
postman collection run <collection-id>
Common options:
# Stop on first failure
postman collection run <collection-id> --bail
# With request timeout
postman collection run <collection-id> --timeout-request 10000
# With environment
postman collection run <collection-id> -e ./postman/environments/<env-file>.json
# Override environment variable
postman collection run <collection-id> --env-var "base_url=http://localhost:3000"
Step 3: Parse and Report Results
Parse the CLI output for pass/fail counts, failed test names, error messages, and status codes.
Step 4: Handle Failures
If tests fail:
- Analyze error messages
- Read relevant source code
- Suggest fixes
- After fixes, re-run to verify