Functional testing of a Java application sample project

To use these examples, copy the testobject and superscript directories and their contents into a functional test project.

To use one of the superscripts, set the helper superclass property for a script to the full class name of the superscript. For example, to use the ExtensionScript superclass, for a script called "X":

  1. Right-click "X" in the Functional Test Projects View and then select Properties from the popup menu.
  2. In the Properties for X.java window, select Functional Test Script in the list on the left.
  3. Finally, set the text in the edit box labeled Helper superclass to superscript.ExtensionScript.

You can also modify your project preferences so that all newly created scripts in the project will extend this superscript. To define a default helper superscript for a project, perform these steps:

  1. Right-click the project and then select Properties from the menu.
  2. Then, set the text field in the Functional Test Project labeled New Script Helper superclass.

After completing these steps, your X.java script can make use of the additional methods of ExtensionScript such as getClipboardText(), setClipboardText(), clipboardVP(), etc.

Class Package Description
ExtensionScript superscript Provides some general utility methods.
HtmlScript superscript Provides a handler to automatically dismiss unexpected active HTML dialogs.
WindowScript superscript Provides some useful methods for getting around problems with native Microsoft® Windows® Applications.
SwtScript superscript Provides some useful methods for testing SWT-based applications. Note that this implementation makes use of WindowScript, which is Microsoft-Windows specific. This class will not work on Linux®.
EclipseScript superscript Provides some methods that may be useful when testing plugins running inside the Eclipse platform (see http://www.eclipse.org/). Note that this code makes use of internal Eclipse classes, and consequently might break with future versions of Eclipse. This class illustrates invoking static methods in the SUT and using custom test objects.
WorkbenchTestObject testobject.eclipse A test object for the Eclipse (see http://www.eclipse.org/) shell Workbench.
WorkbenchWindowTestObject testobject.eclipse A test object for the Eclipse (see http://www.eclipse.org/) shell WorkbenchWindow.
WorkbenchPageTestObject testobject.eclipse A test object for the Eclipse (see http://www.eclipse.org/) shell WorkbenchPage.