postman test script to set json value code example
Example 1: responce json snippet check postman
pm.test("Status code name has string", () => {
pm.response.to.have.status("Created");
});
Example 2: postman test script get request code
tests["Status code is 200"] = responseCode.code === 200;
//log
console.log(tests["Status code is 200"] = responseCode.code != 200)