cancel
Showing results for 
Search instead for 
Did you mean: 

Call REST API from TESTCOMPLETE

SOLVED
Highlighted
New Contributor

Call REST API from TESTCOMPLETE

Hi,

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

Re: Call REST API from TESTCOMPLETE

Hi,

 

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. 

Best,
Justin Kim

View solution in original post

5 REPLIES 5
Highlighted
Staff

Re: Call REST API from TESTCOMPLETE

Hi,

 

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. 

Best,
Justin Kim

View solution in original post

Highlighted
New Contributor

Re: Call REST API from TESTCOMPLETE

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?

 

 

Staff

Re: Call REST API from TESTCOMPLETE

Http 400 is just a general error thats generally due to invalid syntax.image.png

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

Best,
Justin Kim
Highlighted
Community Hero

Re: Call REST API from TESTCOMPLETE

@Emilija :

Hi,

 

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.)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: Call REST API from TESTCOMPLETE

Thank you everyone!

 

Hi @Emilija , was this solved for you? Please share your progress.


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors