cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Test Engine REST API in third party tool?

SOLVED
Highlighted
Contributor

How to use Test Engine REST API in third party tool?

Hi all,

 

I'm trying to create a tool by myself and simulate some user action (Click, ClickR, ClickItem, SetText, etc..) on an application by calling the API. Based on the documentation, it stated that Enables you to access the test engine from third-party tools. You can access tested applications, their objects, properties and methods, and simulate user actions on the tested applications.

 

I'm not sure how to use the Test Engine REST API as there are not much reference or example explain about how to use the API with third party tool. Is the API works like what I would like to do?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

Hi,

 

What is your final goal?

 

The help article that you referenced and quoted relates to Test Engine REST API. And the corresponding article (https://support.smartbear.com/testcomplete/docs/reference/apis/test-engine.html) says that Test Engine REST API is mostly used by Test Left. But when Test Left is installed, special edition of TestExecute (which is runtime engine for TestComplete) is installed as well and it is TestExecute that does the actual job.

The above means that you will not be able to create your custom program that can drive your tested application via Test Engine REST API, but TestExecute (or TestComplete) will be required nevertheless.

All this makes me to repeat my initial question and wonder what functionality you are missing in TestComplete that forces you to create your custom test driver application (that still requires TestComplete/TestExecute to be installed on the test box)?

 

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

14 REPLIES 14
Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

Did you look at the web interface that's mentioned on this page?

https://support.smartbear.com/testcomplete/docs/reference/apis/test-engine.html

Highlighted
Contributor

Re: How to use Test Engine REST API in third party tool?

Yes but I'm not sure how to implement the API. Also, it stated that simulate user actions on the tested applications but from the API list operation, I can't find any API that is related to simulate user actions. Am I missing out something?

 

One more question is: When TestComplete is running / recording, can we use the API at the same time?

 

Thanks.

Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

Hi,

 

What is your final goal?

 

The help article that you referenced and quoted relates to Test Engine REST API. And the corresponding article (https://support.smartbear.com/testcomplete/docs/reference/apis/test-engine.html) says that Test Engine REST API is mostly used by Test Left. But when Test Left is installed, special edition of TestExecute (which is runtime engine for TestComplete) is installed as well and it is TestExecute that does the actual job.

The above means that you will not be able to create your custom program that can drive your tested application via Test Engine REST API, but TestExecute (or TestComplete) will be required nevertheless.

All this makes me to repeat my initial question and wonder what functionality you are missing in TestComplete that forces you to create your custom test driver application (that still requires TestComplete/TestExecute to be installed on the test box)?

 

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

Highlighted
Contributor

Re: How to use Test Engine REST API in third party tool?

Hi @AlexKaras ,

 

Thanks for the explanation regarding the Test Engine REST API. I'm trying to create a tool which is able to perform user action automatically while at the same time, TestComplete is recording. Since the TestComplete is not able to run and record at the same time, therefore I'm trying to use the API. So, my final goal is to find a way that can create the test cases automatically.

 

Or maybe it can be a new feature for TestComplete? Able to run script and recording at the same time.

 

Thanks.

Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

Hi,

 

I'm trying to create a tool [...]

I am afraid that you will not be able to get this... The reason is that TestComplete is a single-threaded single-instance application but your scenario assumes two instances of engine to be running: one for recording and one for driving tested application.

You may try to get what you are talking about with the help of some other tool, like AutoIt, for example. AutoIt will drive your application while TestComplete will record. No need for any API. (However, in order to get a more or less good and reusable recording, it is highly recommended to create a proper NameMapping in TestComplete before recording.)

I hardly see the reason to make TestComplete to be able to run the script and record at the same time - if you already have the script, what is the reason to record it?

Did I miss something in your explanation?

 

> One more question is: When TestComplete is running / recording, can we use the API at the same time?

No. API documentation explicitly states that one must wait until test run is over and only then continue to use API.

 

 

 

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
Contributor

Re: How to use Test Engine REST API in third party tool?

>Did I miss something in your explanation?

Since my final goal is to create test case automatically, it would be awesome if we are able to use the script to perform user action automatically instead of doing it manually, at the same time, TestComplete is recording all the actions. In the end, we no need to get the help from other tool, like AutoIt.

Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

@Josh_147 If you've written a script to perform the user action, why do you need to record it as it runs?  TestComplete can (likely) just run your script.

Highlighted
Contributor

Re: How to use Test Engine REST API in third party tool?

Hi @Marsha_R ,

 

The idea is, for example, I would like to perform `Click` action for all the object in a dialog. Those actions will done by the script, at the same time, those actions were recorded. Then, in the KeywordTests, I can edit those actions such as Delete; Insert New Operation; Checkpoints, Test Actions, Statements, etc.. In the end, I will run the TestProject by using the KeywordTests but not the script. The purpose of the script is only used to create KeywordTests automatically.

 

Hope it explain well 🙂

Highlighted
Community Hero

Re: How to use Test Engine REST API in third party tool?

Let me ask this, what language are your scripts written in?

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