Complete the code to set the request method to POST in Postman test script.
pm.request.method = '[1]';
The correct HTTP method to set for sending data is POST.
Complete the code to check if the response status code is 200 in a Postman test script.
pm.test('Status code is 200', function () { pm.response.to.have.status([1]); });
Status code 200 means the request was successful.
Fix the error in the code to correctly set an environment variable in Postman.
pm.environment.[1]('token', pm.response.json().access_token);
The correct method to set an environment variable is set.
Fill both blanks to correctly extract a JSON value and assert it equals 'success' in Postman test script.
const status = pm.response.json().[1]; pm.test('Status is success', function () { pm.expect(status).to.[2]('success'); });
The JSON key is status and the assertion method to check equality is equal.
Fill all three blanks to create a test that checks if the response time is less than 500ms in Postman.
pm.test('Response time is fast', function () { pm.expect(pm.response.[1]).to.be.[2](450).and.[3](500); });
Use responseTime to get response time, below and lessThan to assert it is under 500ms.