Developing Support for Running Tests

When OpenText Functional Testing runs a test step, it first calls FindObjectId2 to retrieve the appropriate object ID from the Testing Agent based on the stored description of the test object. (If FindObjectId2 is not implemented by the Testing Agent, OpenText Functional Testing calls FindObjectId). If the object is not found or if FindObjectId2 returns more than one object ID, OpenText Functional Testing can use Smart Identification to identify the object in the application. OpenText Functional Testing uses Smart Identification only if the OpenText Functional Testing user configured Smart Identification for the relevant test object.

Next, OpenText Functional Testing calls the RunEx method with the object ID, the test object method to run on the object, and the arguments for that test object method. (If the RunEx method is not implemented, the Run method is called). You must implement the RunEx or Run method so the Testing Agent performs the appropriate operations on the application being tested. Implement ITestable3 and the RunEx method if you want to add test-object related lines to the OpenText Functional Testing run results while performing the step.

To enable OpenText Functional Testing to provide meaningful error messages to the OpenText Functional Testing user, you must implement the GetLastError method.

The following diagram shows the general sequence of methods that OpenText Functional Testing calls when running a test. This illustrates the purpose of the methods that the Testing Agent must implement. For example, OpenText Functional Testing calls FindObjectId2 which is implemented by the Testing Agent in the ITestable2 interface. If FindObjectId2is not implemented, OpenText Functional Testing calls FindObjectId, which is implemented by the Testing Agent in the ITestable interface. (Note that if you implement ITestable2 or ITestable3, you must implement FindObjectID2.)

The diagram also shows the use of the GetLastError method. For more information, see Implementing the GetLastError Method: Reporting Errors.

For more information, see: