Lesson 3: Create verification points
In this lesson, you will record verification points to test objects. Verification points verify that a certain action has taken place, or verify the state of an object.
About this task
Create a data verification point
About this task
Procedure
- In the Recording Monitor, click the Insert Verification Point or Action Command button .
- In the Select an Object page of the Verification Point and Action Wizard, clear the After selecting an object advance to next page option if it is selected.
-
Use the Object Finder ) to select the Composers tree in the application. Click the Object
Finder and drag it over the tree. While holding down the mouse button, you
will see that the entire tree is outlined with a red border and the object name is
displayed
javax.swing.JTree
in a screen tip next to the red border. When you release the mouse button to make the selection, notice that the recognition properties for the object are listed in the grid at the bottom of the Select an Object page. - Click Next.
- In the Select an Action page, make sure Perform Data Verification Point is selected and click Next.
-
In the Insert Verification Point Data Command page, in the Data
Value field, select the Tree Hierarchy test.
This test captures information about the entire tree hierarchy.
- In the Verification Point Name field, type Classics_tree and click Next.
- The Verification Point Data page displays the captured data in a grid in the right pane. If a check mark appears in the box beside an item, that item will be tested. By default, all items are selected. Leave them checked. If they are not selected, click the Check All button.
- Click Finish.
Create an image verification point
About this task
Procedure
- In the Recording Monitor, click the Insert Verification Point or Action Command button .
- In the Select an Object page of the Verification Point and Action Wizard, clear the After selecting an object advance to next page option if it is selected.
-
Use the Object Finder to select the Album image in the application. Click the Object
Finder and drag it over the album image. While holding down the mouse
button, you will see that the album image outlined with a red border and the object name
is displayed
javax.swing.JLabel
in a screen tip next to the red border. When you release the mouse button to make the selection, notice that the recognition properties for the object are listed in the grid at the bottom of the Select an Object page. - Click Next.
- In the Select an Action page, selectPerform Image Verification Point and click Next.
- In the Insert Image Verification Point Command page, type Album_image as the Verification Point Name.
- Make sure that the option Select full image is selected and click Next.
- The Verification Point Data page displays the captured image in the right pane. Click Finish.
Create a properties verification point
About this task
Procedure
- In the ClassicsCD application, click . Do not click either of the password fields at this time.
-
Click OK.
You will test the label "Order for Trent Culpito" in the View Existing Orders window.
- In the Recording Monitor, click the Insert Verification Point or Action Command button .
- In the Select an Object page, select the After selecting an object advance to next page option.
-
Drag the Object Finder over the label "Order for Trent
Culpito" to select it. While holding down the mouse button, note that the label is
outlined with a red border and the object name is displayed
javax.swing.JLabel
).After you select the object, the Select an Action page opens because you selected the advance to next page option. - Select Perform a Properties Verification Point, which is the second action from the top, and then click Next.
- On the Insert Properties Verification Point Command page, confirm that the Include Children field is set to None.
- Under Verification Point Name, accept the suggested default.
-
Leave the Use standard properties option selected and then
click Next.
On the Verification Point Data page, the test object properties and their values are displayed in a grid format. You can choose which properties to test in the Property column and can edit the property values in the Value column.Learn more about selecting object properties: By default, none of the properties are selected. To test object properties, choose the properties that you want to test by selecting each property. The properties you select are tested each time you play back a script with this verification point. You can select all properties in the list by clicking the Check All toolbar button above the grid. Use the Uncheck All button to clear all properties. For best results when using a Properties verification point, test only the properties you are interested in. In this case, only the text property is of interest to determine whether the order is for the correct customer.
- In the Property column select the text, opaque, and visible properties to test them during playback. You may have to click the check box twice for the selection to persist.
- Click Finish.
- In the ClassicsCD View Existing Orders window, click Close.
Test the password fields
About this task
Procedure
- Expand the Haydn folder in the composers tree.
- Click Symphonies Nos. 94 & 98.
- Click the Place Order button.
- In the Member Logon window, keep the default settings of Existing Customer and Trent Culpito.
- This time, type xxxx in the Password field.
- Select the Remember Password option.
- Click OK.
- Type a valid card number number and expiration date, for instance, 7777 7777 7777 7777, expiration 06/09.
- Click Place Order.
- Click OK in the order confirmation message box.
- Close the ClassicsCD application by clicking the x button.
- Click the Stop Recording button ) on the Recording toolbar.