Working with the Java harness

How to implement TestArchitect actions using the Java programming language.

This subsection contains two exercises that demonstrate how to create user-scripted actions implemented in the Java programming language, and how to access such actions in your tests.

Supported OS environments

  • Windows
  • Linux
Note:
  • The TestArchitect installation includes the Java Runtime Environment (JRE), which is used to run Java programs. The JRE is included in directory TA_INSTALL_DIR\jre.
  • To develop Java programs, you need the Java Development Kit (JDK). The JDK is free, open source software, available at the Oracle website. Ensure that you have JDK installed before you proceed with the examples here. Also, your system’s PATH variable must be set to include the path to the Java executable: for example, C:\Program Files\Java\jdk1.6.0_31\bin.
  • TestArchitect installation includes the file javaharnesslib.jar, which exposes the automation library objects and functions that are used in the Java harness.
  • Both your installation of TestArchitect and your JDK must be for the same machine architecture (32-bit1 or 64-bit).

Developing your own User-scripted Java harness action
To created a scripted Java action, you must define the action, and modify the existing harness files to implement it.

Scripting an action in Java
Implement an action in Java, using the TestArchitect Java harness.

Creating the test case and stub action
Create a stub action in TestArchitect as a placeholder for thescripted hello actionyou defined previously, then write a test to invoke the action.

Running a Java harness test
Execute the test that calls the hello action you implemented in the Java harness.

User-scripted Java harness action that interacts with GUI
In this exercise, we will create a Java-scripted action that interacts with an application’s user interface. We will also create a new Java class to house the new scripted function implementing the action.


  1. Since 8.5u1 TestArchitect there is no longer a 32-bit version of TestArchitect. You may still be able to run tests on a 32 bit application if it runs well on 64-bit systems. ↩︎


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400