Creating a data verification point
Use a data verification point to test data that is displayed in your application. When you record the verification point, a baseline of the data is created. Then every time you play back the script, the data is compared to see whether any changes have occurred, either intentionally or unintentionally. This is useful for identifying possible defects. You can create a verification point while recording a script or you can insert a verification point anytime in the script.
Before you begin
- Start the application which you want to test.
- When you want to insert a verification point to an existing script, open the script and place the cursor at that point in the script where you want to insert the verification point.
About this task
You can test the following
types of data in your application:
- List data
- Menu hierarchy
- The state of a checkbox or a toggle button in your application
- Table data
- Data that is displayed in a DataGrid control
- Data that is displayed in a DataGridView control
- Data that is displayed in a ToolStrip control
- Textual data
- Tree hierarchy
Tip: When you create a verification point, you can use a
dataset reference instead of a literal value to supply variable data to make your tests more
realistic.
Procedure
- Open the Verification Point and Action wizard.
- If you are creating a verification point while recording, click the Insert Verification Point or Action Command button on the Recording Monitor toolbar.
- If you are inserting a verification point on a script, click the Insert Verification Point into Active Functional Test Script button on the product toolbar.
- On the Select an Object page of the
Verification Point and Action wizard, use the Object Finder to select
the data that you want to test. For more information, See Selecting objects and data value options for data verification points.Tip: If the After selecting an object advance to next page check box on the Select an Object page is selected, the next page of the wizard is displayed after you select the object. If this check box is cleared, click Next to proceed to the next page.
- On the Select an Action page, select the Perform Data Verification Point option and click Next.
- On the Insert Verification Point Data Command page,
perform these steps:
- On the Verification Point Data page, edit the data if required.
- Optional: To use a dataset reference instead
of a literal value for a data verification point:
- Right-click a property, and then click Convert Value to dataset Reference. The dataset Reference Converter dialog box opens.
- Type a new name for the dataset variable or click the dataset Variable arrow to select the variable for the verification point to reference in the dataset.
- Optional: Select the Add value to new record in dataset check box to add the value of the verification point to a new record (row) in the dataset.
- Click OK and close the text box.
- Click Finish.The verification point is added to the script. You can edit the verification point any time by using the Verification Point Editor. For more information, See Verification Point Editor.Notes:
- You can also create a verification point by manually scripting it. For information, see the Adding manual and dynamic verification points topic. Also see the vpManual() and vpDynamic() methods in the API reference topics. Your script can access the same information as the verification points. See the TestObject getProperty() and getTestData() methods
- When you create a verification point without using the Recorder in the script, the test
object is not inserted in the script. You manually insert the test object for which you are
creating a verification point. For example: this script is included when you insert an image
verification point without using the Recorder
.performTest( Screen_imageVP() );
. For the verification point to work, includeRootTestObject.getScreenTestObject()
in the script. This is the script for the verification pointRootTestObject.getScreenTestObject().performTest( Screen_imageVP() );