Add a new TestObject

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

Proxies are developed either in Java or in C#. However, 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.

To add a new TestObject:


  1. Create the constructors for the TestObject.

    Every TestObject must have five standard constructors. New methods that are defined follow these constructors.

  2. 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.

  3. Map the proxies to the newly created TestObject.

  4. 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.

  5. 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.

  6. 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.

Related concepts

Role of a TestObject

Related tasks

Mapping proxies to TestObjects