cancel
Showing results for 
Search instead for 
Did you mean: 

Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisites)?

SOLVED
Daniellovesmith
Contributor

Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisites)?

 
1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisit

Hi,

 

Exact implementation depends on the target endpoint.

TestComplete provides support for SOAP Web Services via WebServices functionality and it may be the best option for this case.

There is no built-in support for REST Web Services and you shoult craft requests manually in this case using HTTPRequest component provided by Windows OS.

In case of TCP endpoint target, this article may help: https://support.smartbear.com/viewarticle/9003/

 

The major possible problem for all above options may be related to the authorization required by the endpoint. It may be not easy to authenticate in case of NTLM, Kerberos, etc., but some workaround may exist depending on the design of the tested system.

 

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
================================

View solution in original post

3 REPLIES 3
AlexKaras
Community Hero

Re: Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisit

Yes, we can.

 

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
================================
Daniellovesmith
Contributor

Re: Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisit

Thanks Alex, Do you have any script on the same please?

AlexKaras
Community Hero

Re: Can we add api calls into the script (JAVA SCRIPT)(As different tests have different prerequisit

Hi,

 

Exact implementation depends on the target endpoint.

TestComplete provides support for SOAP Web Services via WebServices functionality and it may be the best option for this case.

There is no built-in support for REST Web Services and you shoult craft requests manually in this case using HTTPRequest component provided by Windows OS.

In case of TCP endpoint target, this article may help: https://support.smartbear.com/viewarticle/9003/

 

The major possible problem for all above options may be related to the authorization required by the endpoint. It may be not easy to authenticate in case of NTLM, Kerberos, etc., but some workaround may exist depending on the design of the tested system.

 

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
================================

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors