ReferenceError error: json is not defined

I’m wanting to automate my tests but when I run my tests I get this error

this is the test i am running

This line is incorrect.

pm.expect(json.Data[0].profileId).to.eqls(profileId);

You have parsed the response to the variable jsonData (not json.Data).

Get used to console logging your variables for troubleshooting purposes, so you know they are being targeted correctly.

You can remove all of the console logs after you get the code working.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.