Creating a Data Verification Point (Tree Hierarchy)

Use a Data verification point (Tree Hierarchy) to test the data in a tree hierarchy in your application. When you record the verification point, a baseline of the tree 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 to make your tests more realistic.

To create a Data verification point (Tree Hierarchy):

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

  2. In the Functional Tester Recording Monitor, click the Start Application button to start your test application. See Starting Your Test Applications for more information.

  3. Locate the tree in your application that you want to test.

  4. In the Functional Tester Recording Monitor, click the Insert Verification Point or Action Command button on the toolbar.

  5. On the Select an Object page of the Verification Point and Action Wizard, use the Object Finder to select the tree hierarchy in your application. You can click the object finder on any item in the tree, since this verification point can test either the entire tree hierarchy or the hierarchy starting from the top of the tree through the selected item. See the Select an Object page for more information about selecting objects.

  6. Once you have selected the tree hierarchy, one of the values listed on the Object recognition properties grid should be "tree." Verify this and click Next.

  7. 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 Tree Hierarchy or Selected Tree Hierarchy test. Tree Hierarchy tests the entire tree hierarchy. Selected Tree Hierarchy will test the hierarchy starting at the top of the tree, down to the selected item. 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.

    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.

  1. Optionally, edit the data. On the Verification Point Data page, the tree 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 show the entire tree hierarchy if you selected the Tree Hierarchy test. Each top-level node will be shown from top to bottom in the tree in the order they appear in the application. Each individual sub-item is shown under its top-level node. Use the plus and minus signs to open and close the list for each top-level node.

    The Cut, Copy, Paste, and Delete toolbar buttons above the tree apply to the selected item in the tree hierarchy, and are only applicable within the Verification Point and Action Wizard. (It does not use the system clipboard.)

    To edit an item, double-click it in the tree. This opens a small text box that you can use to edit the text of this item. Make your changes, then click the x to close the box. The change will then be reflected in the tree display. You can also edit the list of which tree items get tested during playback by using the check box beside each property in this grid. Checked items get tested.

    For more information, see the Data Verification Point--Tree Hierarchy Display section of the Verification Point Editor.

  2. To use a datapool reference instead of a literal value for a verification point:

    1. On the Verification Point Data page, double-click an item in the tree.

      A small text box opens.

    2. Click Convert Value to Datapool Reference (Convert Value to Datapool Reference) to use a datapool instead of a literal value in a verification point. (If you cannot see the Convert Value to Datapool Reference button on the toolbar, make the page larger by dragging a corner of the page.

      The Datapool Reference Converter dialog box opens.

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

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

    5. Click OK.

    6. Click x to close the small text box.

  3. After you have viewed or edited the tree data, click Finish.

    The verification point will be recorded and added to the script.

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