Use a Properties verification point to test properties of an object in your application. When you record the verification point, a baseline of the object's properties will be created. Then every time you play back the script, the properties 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. You can use a datapool reference for a string, a number, a color, or a boolean instead of a literal value in a properties verification point. You cannot use a datapool reference instead of a literal for more complex objects such as a font, a point, or a rectangle for a properties verification point.
To create a Properties verification point:
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 object 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 one of the selection methods to pick the object in your application, . See the Select an Object page for more information about selecting objects.
Object Finder Tool method -- Use this tool to select an object and all descendents of the object, select one object, or select an object and the immediate children of an object.
Test Object Browser method -- Use this method to browse for the object that you want to select. The browser displays a hierarchical tree of objects in your application. The top level shows any applications you have running. Under each top level, Functional Tester displays the object hierarchy within that application. It is a dynamic view of the currently available objects.
Time Delayed method -- Use this method to select pop-up objects, such as menus. This method uses the Object Finder tool, but enables you to set a delay, which gives you time to get to an object that requires clicking on other objects first.
Note: By default, the After selecting an object advance to next page check box on the Select an Object page is selected. After you select an object, the next page in the Verification Point and Action wizard appears. If you deselect the After selecting an object advance to next page check box, after you select an object, you must click Next to advanced to the next page.
On the Select an Action parge, click the Perform Properties Verification Point option, the second option from the top, and then click Next.
Use the Include Children field to choose whether you want to include the properties of the object's child objects (if it has any). None will test the object only (no children), Immediate will test the object and any immediate children (one level down), and All will test the object plus all of its children down the entire hierarchy.
Under Verification Point Name, accept the suggested default, or type a new name in the box. This name must follow standard Java naming conventions.
Choose whether to use standard property types. Standard properties are properties available across platforms and browsers. Nonstandard properties may include platform-specific properties.
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.
Edit the properties data. On the Verification Point Data page, the test object's properties and their values will be displayed in a tree table format. You can edit which properties get tested in the Property column, and can edit the property values themselves in the Value column.
By default, all properties will appear with no checkmark, which means they will not be tested. To test object properties, you must choose which properties you want to test by checking each of them. Checked properties will be tested each time you play back a script with this verification point. You can check all properties in the list by clicking the Check All toolbar button above the grid. Use the Uncheck All button to clear all properties. It's a good idea to just test the specific properties you are interested in when you use a Properties verification point.
To edit a value, double-click the tree table cell. That cell will then be editable. Click outside the cell to make the edit take effect. In most cases, as for a simple value, the property is rendered as a leaf tree node, and double-clicking it makes the cell an editable field. In the case of complex values, the property is rendered as a non-leaf tree node, and double-clicking the value will expand it and list the sub-values as leaf tree nodes underneath. You can then edit the values of those sub-properties. In the case of the color property, the Color Chooser opens for editing the color value.
See the Verification Point Data page for more information about editing the property data in this page.
To use a datapool reference instead of a literal value for a property verification point:
In the Property
column, select a property, right-click, 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 Finish.
The verification point will be recorded and added to the script.
Note: If you click Finish and have no properties selected for testing (checked), a warning will display.
After you record any other verification points or actions, end your recording by clicking the Stop Recording button on the 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 change a property value to a regular expression or numeric range, or change one of them back to its original property value, using the Verification Point Editor. For information, see Replacing an Exact-Match Property with a Pattern.
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.