As title, How can I access Request object in PostMan ? Is it possible to create a testcase like this
tests["Response content restaurant Id : ", req.body.restaurantId] = responseBody.has(req.body.restaurantId);
To write your first test script, open a request in Postman, then select the Tests tab. Enter the following JavaScript code: pm. test("Status code is 200", function () { pm.
After doing some research in Postman Sandbox
I finally found the answer for myself.
var reqBody = JSON.parse(request.data); var resBody = JSON.parse(responseBody) tests["Data"] = reqBody.restaurantId === resBody.restaurantId;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With