postman-project/ ├── collections/ │ └── api-collection.json ├── environments/ │ ├── dev.postman_environment.json │ ├── staging.postman_environment.json │ └── prod.postman_environment.json ├── reports/ │ └── collection-run-results.json ├── scripts/ │ ├── pre-request-scripts.js │ └── test-scripts.js ├── postman.config.json └── README.md
Collection runner results in Postman - Framework Patterns
Start learning this pattern below
Jump into concepts and practice - no test required
- Collections: Define API requests and workflows to test endpoints.
- Environments: Store variables like base URLs and credentials for different setups.
- Scripts: Pre-request and test scripts to set variables and assert responses.
- Reports: Store results from collection runs for analysis and debugging.
- Config: Postman configuration file to manage runner options and global settings.
Use environment files to switch between dev, staging, and production easily. Store sensitive data like API keys in environment variables, not in collections. Use postman.config.json to define runner options such as iteration count, delay between requests, and data files for data-driven tests.
Run collections via Postman Collection Runner or Newman CLI to generate JSON or HTML reports saved in the reports/ folder. Integrate Newman runs into CI/CD pipelines (e.g., GitHub Actions, Jenkins) to automate tests on code changes. Use reports to track pass/fail status, response times, and assertion details.
- Keep collections modular and focused on specific API areas.
- Use environment variables to avoid hardcoding sensitive data.
- Write clear and simple test scripts with meaningful assertions.
- Store reports systematically for historical test result tracking.
- Integrate collection runs into CI/CD for continuous feedback.
Where in this folder structure would you add a new environment file for testing a new QA environment?
Practice
Solution
Step 1: Understand Collection Runner output
The Collection Runner shows results of running multiple API requests together, including status codes, response bodies, and test results.Step 2: Identify what is NOT shown
It does not show server source code, only URLs, or user credentials.Final Answer:
Status codes, response bodies, and test pass/fail results -> Option CQuick Check:
Collection Runner output = status codes + responses + test results [OK]
- Thinking it shows server source code
- Confusing request URLs with results
- Expecting user credentials in results
Solution
Step 1: Locate export option after running collection
After running a collection in the Collection Runner, a button labeled 'Export Results' appears to save the run data.Step 2: Confirm other options are incorrect
Right-clicking the collection does not export results, console is for logs, and results can be exported.Final Answer:
Click the 'Export Results' button after running the collection -> Option AQuick Check:
Export button appears after run [OK]
- Trying to export before running collection
- Using console logs to export results
- Assuming export is unavailable
Solution
Step 1: Interpret HTTP status codes
Status code 200 means success; 404 means 'Not Found' error indicating failure for that request.Step 2: Analyze the sequence of codes
Two requests succeeded (200), one failed (404), so not all succeeded.Final Answer:
One request failed with 'Not Found' error -> Option BQuick Check:
200 = success, 404 = failure [OK]
- Assuming all requests succeeded
- Confusing 404 with success
- Ignoring mixed status codes
Solution
Step 1: Understand why no results appear
If Postman is offline or disconnected, it cannot run requests, so no results show.Step 2: Check other options
Clicking 'Run' is required but error message suggests connection issue; empty collection or server errors still produce results.Final Answer:
Postman is offline or disconnected -> Option AQuick Check:
No results + error = connection problem [OK]
- Assuming forgot to click run
- Thinking empty collection causes error
- Confusing server errors with no results
Solution
Step 1: Identify how to share detailed results
Exporting results as JSON includes all test pass/fail info and response data for exact sharing.Step 2: Evaluate other options
Screenshots may miss details, sending collection without run lacks results, URLs alone miss responses and tests.Final Answer:
Export the results as a JSON file and send it -> Option DQuick Check:
JSON export = full detailed results [OK]
- Relying on screenshots only
- Sharing collection without results
- Sharing URLs without responses
