Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Integration of TestRail from within TestComplete


Hi There,

I’m trying to get the results from my automated tests in TestComplete (Smartbear) transferred to TestRail.

Although there is an API, i’m getting stuck, cause the TestComplete Tool does only understand pls files.

I tried the following script:

Sub TRCom()

  Dim o
  Set o = CreateObject("MSXML2.XMLHTTP") "GET","",False,"user","password"
  o.setRequestHeader "Content-Type", "application/json" 
End sub

But I’m running into a 401 error. I’m pretty sure that user and password are ok.

Is there any other way addressing TestRail via VBScript?

Thanks in advance!


I got it talking with this version: now up to next challenge: reading the json…

Sub TRCom2()

Dim o, TCuser, TCpassword, TClogin, TCpassphrase

TCuser = "user"
TCpassword = "password"
TClogin = TCuser&":"&TCpassword
TCpassphrase = "Basic " & Base64Encode(TClogin)

Set o = CreateObject("MSXML2.XMLHTTP") "GET","", False
o.setRequestHeader "Content-Type", "application/json" 
o.setRequestHeader "Authorization", TCpassphrase

End sub

The Base64Encode and Decode can be found here:


Hi Dominic,

Thanks for your posting and sharing this, that’s appreciated. VBS is quite old so there’s no official JSON support I believe but the following topic looks good as a starting point: