Challenge - 5 Problems
Newman CI/CD Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Newman run output in CI pipeline
You run the following Newman command in a CI pipeline:
What will be the content of
newman run collection.json -e environment.json --reporters cli,json --reporter-json-export result.jsonWhat will be the content of
result.json after the run?Postman
newman run collection.json -e environment.json --reporters cli,json --reporter-json-export result.json
Attempts:
2 left
💡 Hint
Think about what the JSON reporter exports when used with --reporter-json-export.
✗ Incorrect
The JSON reporter exports a detailed JSON file with all test run data including requests, responses, and assertion results. It is not a summary or CSV.
🔀 Workflow
intermediate2:00remaining
Integrating Newman in a Jenkins pipeline
You want to add a Newman test run to your Jenkins pipeline script. Which snippet correctly runs a Postman collection and fails the build if any test fails?
Attempts:
2 left
💡 Hint
Which option stops the pipeline on test failures?
✗ Incorrect
The --bail option stops the run on first failure and causes the command to exit with a non-zero code, failing the Jenkins build.
❓ Troubleshoot
advanced2:00remaining
Newman fails in CI with 'command not found'
Your CI pipeline fails with the error:
What is the most likely cause?
sh: newman: command not foundWhat is the most likely cause?
Attempts:
2 left
💡 Hint
The error says the command itself is missing.
✗ Incorrect
The error means the shell cannot find the newman executable, usually because it is not installed or PATH is not set correctly.
✅ Best Practice
advanced2:00remaining
Best practice for storing Postman collections in CI
Which is the best practice for managing Postman collections in a CI/CD pipeline?
Attempts:
2 left
💡 Hint
Think about version control and automation.
✗ Incorrect
Storing collections as JSON files in the repo allows version control, easy updates, and automated CI runs.
🧠 Conceptual
expert2:00remaining
Understanding Newman exit codes in CI
What exit code does Newman return when all tests pass successfully in a CI pipeline?
Attempts:
2 left
💡 Hint
Standard Unix convention for success.
✗ Incorrect
Newman returns exit code 0 when all tests pass, indicating success to the CI system.