NV
Size: a a a
NV
M
NV
Ri
Kx
Ri
Ri
Ri
NV
A
NV
NV
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});
const testrail_url = "https://testrail.com/index.php?/api/v2/add_result/" + pm.environment.get("init_call_id");
pm.sendRequest({
            url: testrail_url,
            method: 'POST',
            header: {
                'Content-type': 'application/json',
                'Host': 'testrail.com',
                'Authorization': pm.globals.get("testrail_api_key"),
            },
            body: {
                mode: 'raw',
                raw: JSON.stringify({'status_id': 1, 'assignedto_id': pm.globals.get("testrail_ID")})
            }
}, function (err, res) {
         console.log(err ? err : res.text());
});NV
NV
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});
const addResult = {
            url: `https://testrail.com/index.php?/api/v2/add_result/${pm.environment.get("init_call_id")}`,
            method: 'POST',
            header: {
                'Content-type': 'application/json',
                'Host': 'testrail.com',
                'Authorization': pm.globals.get("testrail_api_key"),
            },
            body: {
                mode: 'raw',
                raw: JSON.stringify({'status_id': 1, 'assignedto_id': pm.globals.get("testrail_ID")})
            }
};
pm.sendRequest(addResult, function (err, res) {
         console.log(err ? err : res.text());
});NV
NV
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});
const findPetByStatus = {
  url: 'https://petstore.swagger.io/v2/pet/findByStatus?status=available',
  method: 'GET',
};
pm.sendRequest(findPetByStatus, function (err, res) {
  console.log(err ? err : res.json());
});NV
A