While TestComplete does have some limited capability to test APIs, the best solution is to use Smartbear's dedicated API testing tool ReadyAPI. ReadyAPI is a low-code API testing platform, and TestComplete can run functional and security tests created with ReadyAPI.
Here is an example function written in JavaScript using the TestComplete aqHttp Object for direct testing. It's very basic but you should be able to build it out from here.
Hmm... your statement above not correct: both SoapUI and ReadyAPI integrate with TestComplete
If you have the Web Module, SoapUI is free and supported by SmartBear. ReadyAPI is Smartbear's paid option and is better as far as use and capability. Otherwise you will need to use a shell call to the TestRunner and parse StdOut.
Ah, I see. This will return the assertion results then? I have not tried this. In my code I am pulling the JSON data from the API call to use as data for further testing and verification. Can this be done here as well?
The aqHttp object is based on IWinHttpRequest (from WinHTTP) which is considered to be old and outdated for most modern Windows applications. It was originally designed for low-level HTTP communication in Windows.
While TestComplete does have some limited capability to test APIs, the best solution is to use Smartbear's dedicated API testing tool ReadyAPI. ReadyAPI is a low-code API testing platform, and TestComplete can run functional and security tests created with ReadyAPI.