TestLeft - Basic Concepts

Applies to TestLeft 15.40, last modified on March 17, 2022

SmartBear TestLeft is an automated test framework for creating and running functional and UI tests for Windows desktop and Web applications. You can create tests in Java and run them with any Java testing framework (for example, JUnit or TestNG) or by using any CI system (for example, Jenkins).

TestLeft is built on the TestComplete engine (both of them have a similar object recognition engine) and it supports most applications and technologies supported by TestComplete.

Creating a Test

You can create TestLeft tests in any Java IDE you like, for example, Eclipse, IntelliJ IDEA, or NetBeans:

Get started with TestLeft: TestLeft components

Click the image to enlarge it.

You can create tests using any Java IDE running under any operating system (including non-Windows operating systems). However, you can do the following only on Windows operating systems –

  • Run created TestLeft tests.

  • Explore the object hierarchy of your tested applications (more on this below).

Exploring the Application Hierarchy

You explore objects in your tested applications with the TestLeft UI Spy tool that is installed along with TestLeft. To run it, start the UI Spy executable in the operating system (<TestLeft folder>/Bin/SmartBear.TestLeft.UI.Spy.exe), or select Tools > TestLeft UI Spy from the IDEA main menu:

Open the TestLeft UI Spy from IDEA

This menu item is added by the TestLeft IntelliJ Idea Plugin that is installed and enabled by the TestLeft installation program. If you do not see the menu item, check if the plugin is installed.

The TestLeft UI Spy shows the applications running on the computer, the object hierarchy of these applications and object properties and methods. You can select an object on screen to view its properties and methods. To select the object that is currently under the mouse cursor, use the Pick Object tool. To select an object while moving the mouse cursor in the application, use the Point and Fix tool.

Get started with TestLeft: Explore object hierarchy with TestLeft UI Spy

Click the image to enlarge it.

You can also locate objects in the hierarchy by highlighting appropriate interface elements in the application.

Writing Test Code

You include the TestLeft-15.40.jar library to your test project and write test code using classes and methods that the library provides. Typically, you write code that gets access to your tested application and its controls and then simulate user actions over them.

You can write code manually or you can command TestLeft to generate the needed code automatically:

Get started with TestLeft: Generate code for automated tests

Click the image to enlarge it.

Running Tests

You can run your test code in any way –

  • from IDE,

  • from your test runner (for example, JUnit or TestNG, if you compiled your TestLeft test code as an appropriate test),

  • from command line,

  • from Jenkins or any other build automation tool,

  • from TestComplete,

  • or in any other way.

When your test is running, it sends commands to the test runtime engine, which, in its turn, simulates user actions on the tested application:

Get started with TestLeft: Run tests

The test can send commands to the runtime engine that resides on your computer or on any other computer that has TestLeft installed and that is available in your network. Your test code can also send commands to remote instances of TestExecute and TestComplete (starting from version 11.31, these products can accept commands from TestLeft).

About Web Service

TestLeft interacts with the test runner through a RESTful web service. This web service is part of TestLeft and installs automatically, when you install TestLeft.

TestLeft UI Spy uses the service for exposing applications, windows and controls existing in your computer. The service provides information on objects, methods and properties that TestLeft UI Spy shows.

To learn more about the web service, see TestLeft RESTful Web Service.


Prev     Next

See Also

Your First Test With TestLeft - Java Tutorial

Highlight search results