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?
I don't have the web module. All of my code has been based on what I have learned mostly with SoapUI, JavaScript and what can be done without additional licensing. I will do some research here and learn about the possibilities. Thanks!
So, it looks like the short answer is YES you can. It looks like this integration provides a nice way to access the TestRunner and provide better logging to TestComplete. 👍
Parsing the JSON would likely be unchanged as it would likely still need a Groovy script in SoapUI or ReadyAPI to process the JSON to a File for TestComplete or pull directly from StdOut.