Forum Discussion

malj's avatar
malj
Contributor
10 years ago

Consuming WebSocket or REST services

We would like to use a tool for model-based testing that can provide a WebSocket or REST service. It does not seem like TestComplete supports any of these but I am not an expert on the area so, is th...
  • Colin_McCrae's avatar
    10 years ago

    You can certainly connect and converse with RESTful API's. I'm just finishing off a bunch of script extensions to make use of the new TFS RESTful API for updating test results in TFS from TestComplete.

     

    I use an "MSXML2.ServerXMLHTTP" object ( https://msdn.microsoft.com/en-us/library/ms766431(v=vs.85).aspx )

     

    Which can have headers and body attached and receives a response object in return containing response code, body text etc. Mine is primarily JSON so I'm also using http://www.aspjson.com/ in a script extension as my JSON parser. (Mainly as I'm most familiar with VBScript)

     

    Not so sure about websockets. Never tried to use them directly from TC.