Use a Data verification point (Table) to test table data in your application. When you record the verification point, a baseline of the table 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 (Table):
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 table 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 table in your application that you want to test. To test the entire table, you can select any cell in the table. To test only a single cell or selected cells, select the cell(s) first, then click the Object Finder anywhere within the selected cell(s). See the Select an Object page for more information about selecting objects.
Once you have selected the table, one of the values listed in the Object recognition properties grid should be the word "table." 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 Table Contents or Selected Table Cells test. Table Contents tests the contents of the entire table. Selected Table Cells will test only the cells that are selected. 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: See the note at the end of this topic detailing which data tests are available for HTML tables.
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 table displays the same information as the table in your application. To edit the content of the verification point data, double-click any cell in the table to edit that cell.
You can also edit which cells in the table get tested. Table cells that are within the comparison regions are shown with a grey background. If you are testing the entire table, all cells will be grey. You can use the drop-down list in the toolbar above the data region as a selection mechanism. Choose Column, Row, or Cell Selection in the list, then make your selections in the table. For example, if you select Row Selection, when you click on a cell in the second row, the whole second row will be selected. If you had chosen Cell Selection, only that cell would have been selected. After you select the data you want to compare, click the Update Comparison Region button to have your changes take effect.
The Cut, Copy, Paste, and Delete toolbar buttons above the table area apply to the selected row(s), and are only applicable within the Verification Point and Action Wizard. (It does not use the system clipboard.)
There are features in the Metadata tab that you can also use to edit the table data. For example, you can edit the table's column headers or row headers by accessing them in the MetaData tab. To edit column headers, double-click the Value column of the columnHeaders property. A small editor opens that lets you edit the headers. The row headers work the same way if your table has them. Double-click the rowHeaders Value to edit them. In order for the column headers to be compared, you must change the compareColumnHeaders property to true in the MetaData tab. The compareRowHeaders value works the same way to indicate whether row headers will be compared.
If you double-click the Value of the compareRegions property in the Metadata tab, an editor will open showing the selected regions of your table. For selected sells, it shows the row index or key value pairs and the column header or index of each selected cell. For selected rows, it shows the row index or key value pairs. For selected columns, it shows the column header or index. Using this compare regions editor is another way you can select which regions get compared. If you click the Compare All Cells button in this editor, all of the table cells will be tested.
If your table supports row keys or column keys, you can edit those and insert keys by double-clicking on the columnKeys and rowKeys values in the Metadata tab.
Click the Help button for more information on the Verification Point Data page.
To use a datapool reference instead of a literal value for a verification point:
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.
After you have viewed or edited the text 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.
Note: For HTML tables, the available data types are:
Visible Text - All text from all table cells.
Table Contents - Tries to find row and column headers.
Data Grid - All cells, including header cells, are in the grid of table cell data.
Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.