NS
//checking response and json format
pm.test("Status is ok, response is json", function () {
pm.response.to.be.ok;
pm.response.to.be.json;
});
const testrail_url = "https://thirtycapital.testrail.io/index.php?/api/v2/add_result/3629"
pm.sendRequest({
url: testrail_url,
auth: {
type: 'basic',
basic: {
"password": 'xxx',
"username": 'xxx'
}
},
method: 'POST',
header:{'Content-type': 'application/json'
},
body:{
mode: 'raw',
raw: JSON.stringify({
"status_id": pm.response.code === 200 ? 1 : 5
})
}
},