Difference Between .NET and Java Versions of TestLeft

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

TestLeft is implemented as two libraries targeting different platforms:

  • TestLeft for .NET allows creating tests in C#, Visual Basic .NET, or any other .NET language.

  • TestLeft for Java allows creating tests in Java.

Both libraries have similar interfaces and provide similar methods.

This topic lists the differences between the .NET and Java versions of TestLeft.

Library Locations

Both libraries are shipped with TestLeft and reside in its installation folder:

  • .NET Library: <TestLeft>\API\dotNET\SmartBear.TestLeft.dll

  • Java Library: <TestLeft>\API\Java\testleft-15.40.jar

Library references (information on program interfaces, classes, and methods) also reside in the TestLeft installation folder:

  • .NET Library: <TestLeft>\API\dotNET\testleft-net-reference.msha

  • Java Library: <TestLeft>\API\Java\apidocs\

The .NET reference is automatically integrated into Visual Studio, whereas the Java reference is standalone and could be integrated into some of the IDEs. See Getting Help on TestLeft.

Integrations Into Developer Tools

TestLeft for the .NET platform tightly integrates into Microsoft Visual Studio: it provides project and test templates that make it easier to create and run tests; it adds the UI Spy utility as the Visual Studio panel and installs the .NET reference into the Visual Studio help system.

TestLeft for Java provides a TestLeft plugin for IntelliJ IDEA that allows launching TestLeft UI Spy as a standalone application directly from IDEA IDE. If you use any other Java IDE, for example, Eclipse or NetBeans, you can easily launch TestLeft UI Spy as a standalone application manually.

UI Spy

The TestLeft UI Spy utility is both a stand-alone application and a panel within Visual Studio.

Test Object Identification

In addition to the difference in syntax of C#, Visual Basic.NET, and Java, pay attention to the following differences of library implementations:

.NET Java
Interface notation

Class interfaces are prefixed with lower-case "i".

iDriver

Class interfaces start with an upper-case letter and do not have any prefix.

Driver
Method names

Method names start with an upper-case letter.

SetText()

Method names start with a lower-case letter.

setText()
Properties

Properties are a special type of a class member.

diver.Log
process.CommandLine

Properties are not accessible directly, but via the corresponding get and set access methods.

diver.getLog()
process.getCommandLine()
Mismatching names of classes
(so they do not coincide with names of standard classes)
iObject
iProcess
TestObject
TestProcess
Syntax of the Find, FindAll, and TryFind methods

The Find, FindAll, and TryFind methods have only one required parameter, which specifies the search pattern.

myApp.Find<ITopLevelWindow>(myWindowPattern);

The find, findAll, and tryFind methods have two required parameters: one specifies the interface of the returned object, and another specifies the search pattern.

(TopLevelWindow) myApp.find(TopLevelWindow.class, myWindowPattern);

See Also

Introducing TestLeft

Highlight search results