Skip to content

Instantly share code, notes, and snippets.

@ajaysuwalka
Last active June 5, 2019 14:55
Show Gist options
  • Save ajaysuwalka/9d52f86632f9691b2628ed79eda214f5 to your computer and use it in GitHub Desktop.
Save ajaysuwalka/9d52f86632f9691b2628ed79eda214f5 to your computer and use it in GitHub Desktop.
urls.map((us)=>us.split('/').pop()).forEach((key)=>{
var data = JSON.stringify({
"custom_tc_status": 3,
"custom_validation": "Technical Limitation",
"custom_tc_desc": "It requires some desktop part like eclipse to automate which is not supported with current framework. Hence marking ManualExecution",
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://testrail.devfactory.com/index.php?/api/v2/update_case/"+key+"=");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Basic "+btoa('asuwalka:asda')+"");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment