Last active
June 5, 2019 14:55
-
-
Save ajaysuwalka/9d52f86632f9691b2628ed79eda214f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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