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
I want to automaticly update my enviroment variables, then export my environment file and use it in next postman request.
I run request one by one with newman. I group requests in folders, and each folder is my TestScenario. After execution of that test, i log result to my database, and execute next.
What i want to achieve is: Having a jsonfile with url to api, then run special request which will only setVariables in prerequest script, based on this json file. Then i want to export updated env and use in next requests. Unfortunately postman.setEnvironmentVariable and pm.environment.set updated only CurrentValue of variable, so after export value is still the same.
I would like to not do that with some string replace in json file, but do that with postman. How Can i do that?
Collection and environment are local files. They are under git version control. I run collection with newman