| Article Index |
|---|
| IBM Rational Robot Working with Data Tests |
| Page 2 |
| Page 3 |
| All Pages |
Working with Data Tests
This article describes how to work with data tests, which are used with the Object Data verification point. This appendix includes the following topics:
·About data tests
·An example of a data test
·Creating or editing a custom data test
·Copying, renaming, or deleting a data test
For information about the Object Data verification point, see Object Data verification point in the Robot Help Index.
The Object Data verification point supports data tests to capture the data in objects.
In general, there are two types of data tests:
·Built-in data tests - Delivered with Robot. Built-in tests are available to all users no matter which repository they are using. These tests cannot be edited, renamed, or deleted, but they can be copied and viewed.
·Custom data tests - Created within your organization. Each custom data test is stored in the repository that was active when the data test was created. If you switch to a different repository, the custom data tests are not available unless you recreate them in the new repository. Custom data tests can be edited, renamed, and deleted.
When you use the Object Data verification point to test an object that has more than one data test, Robot displays a list of all of the object's data tests (built-in and
custom).
You can select any of the tests in the list depending on what you want to capture and test. For example, you might have data tests defined for a grid that let you:
·Capture all of the data in the grid including fixed columns and rows, even if the data is not visible on the screen.
· Capture only selected or displayed data in the grid.
· Before you create a custom data test, make sure you have the following:
·Access to the documentation or Help that came with the object that you want to test.
·A good understanding of the object's properties and how the properties relate.
·A good understanding of the Object Data verification point. For information, see Object Data verification point in the Robot Help Index.
An Example of a Data Test
One way to understand how to create a data test is to look at a built-in data test. This section explains the All Data test for the MSFlexGrid control.
What the All Data Test Does
When you create an Object Data verification point on the MSFlexGrid, you can select the All Data test in the dialog box that appears, as shown in the following figure.
When you use this data test, Robot captures the data from every cell in the MSFlexGrid control, as shown in the following figures.
The Definition of the All Data Test
You cannot edit the All Data test, because it is a built-in test. However, you can view the test's definition for the MSFlexGrid by looking at the data test in the View Object Data Test dialog box.
The following figure shows the main information in the dialog box:
Because the MSFlexGrid control is a zero-based grid, the numbering for columns and rows actually begins with zero. Therefore, the From box contains 0 as the first column and row, and the To box subtracts 1 from the total number of columns and rows.