Forum Discussion

Sundaytwins's avatar
Sundaytwins
Occasional Contributor
8 years ago
Solved

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...
  • HKosova's avatar
    HKosova
    8 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