[15 Days of Postman for Testers: Day 08] Test failures in Newman

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 have similar problem to this one [15 Days Challenge - tester - Day 8: Collection Run in Chrome Browser Postman Account and with Newman: different results], but a little bit more complicated.
In Postman my tests are passed, but not in Newman. It seems like Newman doesn’t see name, email and uuid (e.g. responseJson.data.name) as json objects? I was trying to parse JSON in other ways but I failed. Thank you for any ideas you’d have. Below I add some screenshots.

my test:
const responseJson = pm.response.json();

pm.test(“Returns correct name, email and uuid”, function () {
pm.expect(responseJson.data.name).to.eql(pm.collectionVariables.get(“name”));
pm.expect(responseJson[‘data’][‘email’]).to.eql(pm.collectionVariables.get(“email”));
pm.expect(responseJson.data.uuid).to.eql(pm.collectionVariables.get(“uuid”))

});

I believe your issue was solved :slightly_smiling_face:. However I would like to mention that I did not face any problems on Day 08. I set all the variables like collection variables along with the postman_api_key and the collection_uid. You can find attached the folder run through newman.