0
0
Postmantesting~20 mins

Newman in CI/CD pipelines in Postman - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Newman CI/CD Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Newman run output in CI pipeline
You run the following Newman command in a CI pipeline:

newman run collection.json -e environment.json --reporters cli,json --reporter-json-export result.json

What 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
AAn empty file because the JSON reporter does not export results automatically.
BA plain text file with only the summary of test results like total tests and failures.
CA JSON file containing detailed test run results including request, response, assertions, and environment variables.
DA CSV file listing all test names and their pass/fail status.
Attempts:
2 left
💡 Hint
Think about what the JSON reporter exports when used with --reporter-json-export.
🔀 Workflow
intermediate
2: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?
Ash 'newman run collection.json --bail'
Bsh 'newman run collection.json || true'
Csh 'newman run collection.json --ignore-errors'
Dsh 'newman run collection.json --silent'
Attempts:
2 left
💡 Hint
Which option stops the pipeline on test failures?
Troubleshoot
advanced
2:00remaining
Newman fails in CI with 'command not found'
Your CI pipeline fails with the error:

sh: newman: command not found

What is the most likely cause?
ANewman is not installed or not in the PATH on the CI agent.
BThe CI pipeline script has a syntax error.
CThe environment file has invalid JSON syntax.
DThe collection file is missing or corrupted.
Attempts:
2 left
💡 Hint
The error says the command itself is missing.
Best Practice
advanced
2:00remaining
Best practice for storing Postman collections in CI
Which is the best practice for managing Postman collections in a CI/CD pipeline?
AManually upload collections to the CI server before each run.
BStore collections and environments as JSON files in the source code repository.
CKeep collections only in the Postman cloud and export manually when needed.
DUse a separate private server to host collections and download them during CI runs.
Attempts:
2 left
💡 Hint
Think about version control and automation.
🧠 Conceptual
expert
2:00remaining
Understanding Newman exit codes in CI
What exit code does Newman return when all tests pass successfully in a CI pipeline?
A255
B1
C2
D0
Attempts:
2 left
💡 Hint
Standard Unix convention for success.