Call REST API from TESTCOMPLETE
We are using TestComplete for Desktop (Version 12.60).
Now we should add API calls in some of our tests.
First, should we buy the web module too?
Does the Send Request operation work without the web module?
Thanks in advance!
Solved! Go to Solution.
The aqHttp object is included in TestComplete by default, and you can use this to make REST api calls as needed. https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqhttp/index.html
You will not need the web module to use this object.
With that said, you will not be able to create assertions or any other backend type of tests using this, but you will be able to view the http responses codes and bodies.
Thank you Justin.
I have created a send request item, but when I try to get token
I constantly get an error with code 400 saying 'invalid_client'
Do you have an idea what could be wrong?
Http 400 is just a general error thats generally due to invalid syntax.
maybe if you share your code, the error logs, and what you're trying to achieve through these calls, some of the other members of the community more well versed in scripting/api requests can help you out! make sure to add some screenshots
You may either ask your developers what this error might mean or use some recording proxy (Fiddler for example) to record the same request sent from some other tool (SoapUI, for example) when it succeeds and from TestComplete when it fails. Analyse the differences and try to eliminate them. (For example, some required header might be missed in the request sent from TC.)
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Thank you everyone!
Hi @Emilija , was this solved for you? Please share your progress.
Community and Education Specialist