Home > Articles > Programming

This chapter is from the book

Determining a Test Object’s Valid Test Data Type Arguments to getTestData()

You can use two techniques to determine a test object’s valid data type arguments:

  1. Call getTestDataTypes() on the test object you need to get data from. getTestDataTypes() is a method in the TestObject class that returns a Hashtable, which holds the same information that the Rational Functional Tester Verification Point Wizard displays (and then some).
  2. Right-click the test object in the Script Explorer, and click Interface Summary. This displays a page in the Rational Functional Tester documentation that summarizes how it works with the selected test object, including the valid data types it can use.

For example, if you invoke getTestDataTypes() on the Orders table in the Classics sample application (Admin > Orders) and print the returned hashtable to the console (Output window in Visual Studio), you have the following:

In Java:

System.out.println( orderTable().getTestDataTypes() );



You see something similar to what is displayed in Figure 3.21.

The keys in the hashtable (contents, visible contents, selected, and selected and visible selected) are the valid test data type arguments to getTestData() for the test object in question; the value of each hashtable key is a description (for you, not Rational Functional Tester) of the test data type. Based on that output, the following are all valid calls to make on the Orders table:

orderTable().getTestData( "contents" );
orderTable().getTestData( "selected" );
orderTable().getTestData( "visible contents" );
orderTable().getTestData( "visible selected" );
  • + Share This
  • 🔖 Save To Your Account