Use a Data verification point (Menu Hierarchy) to test the data in a menu hierarchy in your application. When you record the verification point, a baseline of the menu hierarchy data will be created. Then every time you play back the script, the data will be compared to see if any changes have occurred, either intentionally or unintentionally. This is useful for identifying potential defects.
When you create a verification point you can use a datapool reference instead of a literal value to supply variable data for the properties of a menu to make your tests more realistic.
To create a Data verification point (Menu Hierarchy):
In Functional Tester, Java Scripting, click the Record a Functional Tester Script button on the Functional Tester toolbar or the File > New > Functional Tester Script Using Recorder menu command to start recording a script. In Functional Tester, VB.NET Scripting, click the Record a Functional Tester Script button on the Functional Tester toolbar or the File > New > Add Script Using Recorder menu command to start recording a script. See Recording a Script for more information.
In the Functional Tester Recording Monitor, click the Start Application button to start your test application. See Starting Your Test Applications for more information.
Locate the menu in your application that you want to test.
In the Functional Tester Recording Monitor, click the Insert Verification Point or Action Command button on the toolbar.
On the Select an Object page of the Verification Point and Action Wizard, use the Object Finder to select the menu bar in your application. If you click the object finder on an individual top-level menu in the menu bar, it will record that menu item and its sub-items. If you want to test the entire menu hierarchy, use the object finder to select all the top-level menus. You can tell if you have selected one menu or the whole bar by looking at the object selector text when you hover on the object. See the Select an Object page for more information about selecting objects.
Once you have selected a top-level menu or the whole menu bar, one of the values listed on the Object recognition properties grid should be "menu" or "menu bar." Verify this and click Next.
On the Select an Action page, the Perform Data Verification Point option should be selected, the first option on the page.
In the Data Value field,
select the Menu Hierarchy or Menu Hierarchy with Properties test.
Menu Hierarchy tests all the menus
in the application, plus basic properties on each. Menu
Hierarchy with Properties will test the hierarchy plus detailed
properties on each menu. The list of tests shown in the Data Value field
is dependent on information provided by the object's proxy. Values other
than those described here may be shown.
Note: You can use a datapool reference instead of a literal value to
supply variable data for the properties of a menu to make your tests more
realistic. Click Menu Hierarchy with
Properties if you want to use a datapool reference.
In the Verification Point Name field, accept the default suggestion, or type a new name. This name must follow standard Java naming conventions. The default name is based on the name of the object and the data value you chose to test.
Use the Include Retry Parameters to set a retry time for a verification point during playback to check for its existence. The retry option is useful when playback does not find the verification point in your application. To set a retry time, either use the default, or set your own time. Maximum Retry Time is the maximum number of seconds Functional Tester will retry for the verification point to appear in your application during playback. Retry Interval is the number of seconds between times that Functional Tester will check for the verification point during the wait period.
When you select Include Retry Parameters, Functional Tester will check for the existence of the verification point in your application every 2 seconds, for up to 20 seconds. To set your own time, clear the default fields and type in your own values for Maximum Retry Time and Retry Interval. When you click Finish, the retry for verification point is written into your script, and will occur on future playbacks.
After you accept or edit the fields, click Next to continue.
Optionally, edit the data. On the Verification Point Data page, the menu hierarchy will be displayed in a tree format. You can edit the data here if you need to, or edit it later in the Verification Point Editor. If you don't need to edit the data, go to the next step.
Click the Help button for more information on the Verification Point Data page.
The tree will display the entire menu hierarchy of your application, or one top-level menu and its sub-items, depending on how you recorded the verification point. If you chose the whole menu bar, each top-level menu will be shown from top to bottom in the tree in the order they appear from left to right in the menu bar. Each individual menu item is shown under its top-level menu. Use the plus and minus signs to open and close the list for each top-level menu.
To edit a menu item, double-click it in the tree. This opens its properties displayed in a grid, which you can then edit. You can also edit the list of which menu items get tested during playback by using the check box beside each item in this grid. Checked items get tested. The toolbar buttons above the grid are the same ones that are found in the object properties grid when you record a Properties verification point. For information on these toolbar buttons, see the Properties Verification Point--Grid Display section of the Verification Point Editor. The buttons work the same as described there, except they apply to the selected menu property or value. You can also edit the actual values by double-clicking a value in the Value column of the grid.
If you used the Menu Hierarchy with Properties test, you will see several layers of properties on the menus. Double-click a menu item in the menu tree to open the first property sheet. Under the Property column, there should be a "properties" listing. Double-click "Masked Property Sheet" in the Value column. That opens the set of detailed properties on that menu item. This property grid also works like the grid when you record a Properties verification point. For more information, see the Properties Verification Point--Grid Display section of the Verification Point Editor.
To use a datapool reference instead of a literal value for a menu hierarchy with property in a verification point:
Double-click a menu item in the menu tree
to open a property sheet.
A small text box opens.
Right-click a property, and then click Convert Value to Datapool Reference.
The Datapool Reference Converter dialog box opens.
Type a new name for the datapool variable or click the Datapool Variable arrow to select the variable that you want the verification point to reference in the datapool
Optionally, select the Add value to new record in datapool check box to add the value of the verification point to a new record (row) in the datapool.
Click OK.
Click x to close the small text box.
After you have viewed or edited the menu data, click Finish.
The verification point will be recorded and added to the script.
After you record any other verification points or actions, end your recording by clicking the Stop Recording button on the Recording Monitor toolbar.
After you are done recording, you can open the Verification Point Editor any time to edit this data. See the Verification Point Editor for more information.
Note: You can also create a verification point by manually scripting it. For information, see Adding Manual and Dynamic Verification Points. Also see the vpManual() and vpDynamic() methods of RationalTestScript documentation. RationalTestScript can be found in the API documentation. Click Help > Functional Tester API Reference. Your script can access the same information as the verification points. See the TestObject getProperty() and getTestData() methods.
Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.