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.
Postman has released an update that allows users to set Collection Variables in the Pre-Request scripts. I have been using this new functionality in my Collection and it has successfully worked. When adding this collection to Jenkins, the job fails because Newman does not handle setting Collection Variables in the Pre-Request script.
For example, my Pre-Request script looks like this:
// username and email use sysdate + “@mailinator.com”
const date = new Date();
partialUsername = date.getTime();
const username = “cubic” + partialUsername;
partialEmail = date.getTime();
const email = “cubicTest” + partialEmail + “@mailinator.com”;
pm.collectionVariables.set(‘username’, username);
pm.collectionVariables.set(‘email’, email);
In Jenkins, the error I am seeing is:
failure detail
- TypeError
Cannot read property ‘set’ of undefined
at prerequest-script
inside “C2456099 - Create Account / Create Account”
Looks like Newman needs an update to allow this new functionality released by Postman.
Anyone have any ideas when that would be?