Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
Hi Team
My newman postman collections tests are working fine when executing locally on my machine (mac OS). The collection tests with package.json were checked into git.
Jenkins job is pulling the tests and executing in our Jenkins box. No issues. This job is scheduled for every 30 mins.
Occasionally it fails only on Jenkins with the below exception.
Based on today’s execution the scheduled job was executed 20 times. Out of 20, 14 times that the job was completed succesfully with no issues.
6 times it failed with the below error. It is happening every day. I have been investigating. No clues so far.
Jenkins box node/npm versions
npm :6.7.0,
node : 10.15.0
newman: 4.4.1
13:30:16 npm ERR! code ELIFECYCLE
13:30:16 npm ERR! errno 1
13:30:16 npm ERR! [email protected] xxxxx-tests-stage: newman run collections/zzzz.json -e collections/xxxenv.json -r htmlextra --reporter-htmlextra-export statusdashboard.html --reporter-htmlextra-template test.hbs
13:30:16 npm ERR! Exit status 1
13:30:16 npm ERR!
13:30:16 npm ERR! Failed at the [email protected] dependent-tests-stage script.
13:30:16 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
13:30:16 Build step ‘Execute shell’ marked build as failure
13:30:16 Recording test results
package.json
{
“name”: “xxxx-yyyy-services-dasbhboard”,
“version”: “1.0.0”,
“description”: “Project for Postman tests”,
“scripts”: {
“dependent-tests-stage”: “newman run collections/zzzz.json -e collections/xxxenv.json -r htmlextra --reporter-htmlextra-export ABCD.html --reporter-htmlextra-template test.hbs”,
“dependent-tests-stage-junit”: “newman run collections/zzzz.json -e collections/xxxenv.json --reporter-junit-export results.xml --reporters cli,junit”
},
“repository”: {
“type”: “git”,
“url”: “git URL XYZ”
},
“author”: “ABCD”,
“dependencies”: {
“newman”: “^4.4.0”
},
“devDependencies”: {
“nyc”: “^11.2.1”
}
}
Thanks