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

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”))

});

1 Like

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.