Sundaytwins
9 years agoOccasional Contributor
Integration TestRail and TestComplete
Hi, Is there anyone who has succesfully integrated the TestRail API into TestComplete? I'm working with the VBScripts in TestComplete, but was not yet able to report my results back to TestRail u...
- 9 years ago
I'm not a TestRails expert, but try passing the login/password in the Authorization header:
Dim o, user, password
user = "user" password = "password"
Set o = Sys.OleObject("MSXML2.XMLHTTP") o.open "GET","https://site.testrail.net/index.php?/api/v2/get_case/1", False o.setRequestHeader "Content-Type", "application/json" o.setRequestHeader "Authorization", "Basic " & Base64Encode(user & ":" & password) o.send Log.Message(o.status)The code of the Base64Encode function is in this post on Stack Overflow.
UPD: fixed typos in the example