You can add a new TestObject when there are no TestObjects with
the method that you want to expose for a control, available within the set
of predefined TestObjects provided by Functional Tester.
For example, you can expose any button control as GuiTestObejct() and
operations such as click() and doubleClick() are
defined as methods in it. You can create a new TestObject if you want to introduce
a new method call such as myClick() which is not defined
in any of the existing TestObjects.
Before you begin
Note: Proxies are developed either in Java™ or in C#. However, you must implement
TestObjects for proxies in both Java and C#, because they are just wrappers
to proxies in both Java and Visual Basic .Net scripts. When you add a
new custom TestObject, ensure that you define the Java implementation of the
TestObject. This is required even if you use VS.NET IDE for creating Rational Functional Tester test
scripts.
About this task
To add a new TestObject:
Procedure
- Create the constructors for the TestObject.
Note: Every
TestObject must have five standard constructors. New methods that are defined
follow these constructors.
- Define new canonical names for the TestObject in the customization
file.
You must specify two entries for every canonical name
for both Java and .NET TestObjects in the customization file, because they
are developed in both Java and .NET.
- Map the proxies to the newly created TestObject.
- Build the TestObject binary files.
You can group
all the Java TestObject binary files in a single JAR file and the .NET TestObjects
in a single .NET assembly.
- Deploy the TestObject binary files by copying the files to the Functional Tester customization directory, C:\Documents
and Settings\All Users\Application Data\IBM\RFT\customization.
- Restart Functional Tester.
What to do next
After successfully developing and deploying the TestObject binary
files, the Administrative properties of the newly recorded controls, for which
you have created new TestObjects show the new TestObject names under Test
Object Class Name.