Applies to TestLeft 4.20, last modified on September 11, 2019

About

TestLeft includes a RESTful web service as part of the product. The service is used to exchange data between the test engine, TestLeft UI Spy, applications running in your system and your test modules:

TestLeft RESTful web service

The service receives test commands that your test code executes and sends them to the test engine, which simulates the appropriate user actions. The service also gets information on applications running in your system and sends it to the TestLeft UI Spy. That is, data on applications, windows, controls, and their properties and methods you see in TestLeft UI Spy is provided by the web service.

Install the Service

The service is part of TestLeft. It is installed automatically when you install TestLeft.

Starting from version 11.31, TestComplete and TestExecute also include this service.

Start the Service

The service starts automatically when you do the following:

  • You launch TestExecute that is shipped with TestLeft.

– or –

  • You launch TestComplete or TestExecute Standalone with the REST API plugin enabled (this plugin is installed when you install the appropriate tool, but is disabled by default).

– or –

  • You open the TestLeft UI Spy window and start exploring the applications.

– or –

  • Your test code creates an instance of the LocalDriver object.

To run tests, TestLeft requires the web service running and an interactive user session opened on your computer. If you run your tests on remote computers automatically (for example, as part of an application development cycle managed with a CI system), you may need to open a user session and start the service on your test stations. To do this, you can use the SessionCreator utility that is shipped with TestLeft, TestComplete, and TestExecute. For detailed instructions on using the utility, see SessionCreator.

Port

By default, the service uses port 2377.

To start the service on another port, you can do one of the following:

If the service is using a non-default port, TestLeft UI Spy will not be able to explore the object hierarchy of applications running in the system.

If a firewall or an antivirus is running on your computer, make sure that is allows traffic through the specified port. See Configuring Windows Firewall.

Web Service REST API

The TestLeft web service has an interactive web interface generated with Swagger UI where you can see the service’s API operations and their parameters, make API calls and view the returned data.

You can access the API web interface at the following URL:

http://{host-name}:{port}/

where —

  • host-name - is the network name or IP address of the computer where the TestLeft (or TestComplete or TestExecute) RESTful service is running,

  • port - is the port that the service is using. The default port is 2377.

For instance, to open the Swagger UI page for the service running on your local computer and using the default port, use the following URL:

http://localhost:2377/

See Also

TestLeft Reference

Highlight search results