The Custom Toolkit Support Set
This topic describes the files that make up your Custom Toolkit Support Set.
Understanding the Toolkit Support Class
When all of the classes in a custom toolkit extend the basic user interface class of another toolkit (for example java.awt.Component) we say the custom toolkit extends that toolkit (in this example: AWT). Every custom toolkit support set has one toolkit support class that indicates the native toolkit that the custom toolkit extends.
By extending the custom toolkit support class from the correct native toolkit support set, you ensure that your toolkit inherits all of the necessary utility methods for basic functionality (such as event handling and dispatching).
The OpenText Functional Testing Java Add-in provides custom toolkit support classes for AWT, SWT, and JFC (Swing). When you create new Java Add-in Extensibility custom toolkit support classes you extend one of these, or the custom toolkit support class of other existing Extensibility custom toolkit support sets.
The inheritance hierarchy of toolkit support classes reflects the hierarchy of the custom toolkits. For example, the JFCSupport class extends the class AWTSupport. A toolkit support class of a toolkit that extends JFC will extend JFCSupport thereby inheriting AWTSupport functionality. No further implementation is required in this class.
For example, this is the toolkit support class for the Javaboutique custom toolkit, which extends the AWT native toolkit:
package com.mercury.ftjadin.qtsupport.javaboutique;
import com.mercury.ftjadin.support.awt.AwtSupport;
public class JavaboutiqueSupport extends AwtSupport {}
The following table shows which toolkit support class to extend, if you want to extend the toolkit support classes provided for AWT, SWT, or JFC:
To extend the toolkit support class for: | Extend: |
|---|---|
AWT | com.mercury.ftjadin.support.awt.AwtSupport |
JFC11 (Swing) | com.mercury.ftjadin.support.jfc.JFCSupport |
SWT | com.mercury.ftjadin.support.swt.SwtSupport |
Understanding the Toolkit Configuration File
Every custom toolkit support set has one toolkit configuration file named <Custom Toolkit Name>.xml, which is stored under the OpenText Functional Testing installation folder. This file provides the information needed to find the classes of the custom toolkit support set.
The toolkit configuration file specifies:
The location of the toolkit support class
The location of the compiled support classes (a class folder or Java archive)
OpenText Functional Testing adds this location to the Java application classpath when the application runs, enabling the application to find the required support classes.
The support toolkit description
OpenText Functional Testing displays the description in the Add-in Manager when a user selects the custom toolkit's name in the list of available add-ins. If you are developing this toolkit support set for distribution, include a Provided by clause in this description, specifying the relevant person or company.
A mapping of each custom class to its custom support class
A single custom support class can be mapped to more than one custom class, but each custom class can be mapped to only one custom support class.
The following example illustrates the configuration file of the javaboutique toolkit support, with one supported custom class—AwtCalc:
<?xml version="1.0" encoding="UTF-8"?> <Controls class="com.mercury.ftjadin.qtsupport.javaboutique.javaboutiqueSupport" SupportClasspath="C:\JE\workspace\javaboutiqueSupport\bin" description="Javaboutique toolkit support."> <Control Type="org.boutique.toolkit.AwtCalc"> <CustomRecordReplay> <ImplementationClass> com.mercury.ftjadin.qtsupport.javaboutique.cs.AwtCalcCS </ImplementationClass> </CustomRecordReplay> </Control> </Controls>
You can validate your toolkit configuration file against: <OpenText Functional Testing installdir>\bin\java\sdk\eclipse\plugins\com.mercury.qtjext.plugin.QTJavaExt_1.0.0\ToolkitSchema.xsd
For information on the structure and syntax of the toolkit configuration file, see the Toolkit Configuration Schema Help.
For information on where to store the toolkit configuration file, see Deploying and Running the Custom Toolkit Support.
Understanding the Test Object Configuration File
If you map custom controls to new (or modified) test object classes, you must create one or more test object configuration files in the custom toolkit support set. For more information, see Mapping a Custom Control to a Test Object Class.
In a test object configuration XML, you define the test object classes (for example, the test object methods they support and their identification properties). For details, see The Test Object Configuration XML File.
Understanding Custom Support Classes
In a custom toolkit support set, there is a custom support class for each supported custom class. The custom support class provides the actual interface between the custom class methods and the OpenText Functional Testing capabilities, thus providing the Java Add-in Extensibility.
A single custom support class can provide support for more than one custom class. The support class can be mapped (in the toolkit configuration file) to more than one custom class. This support class then provides support for the custom classes that are mapped to it, and for their descendants.
For details, see Custom Support Classes.

