Verification Services |
This section outlines the actions that you, the test designer, need to take to set up a verification point in a test script.
Use the actions outlined below as a guideline for setting up a verification point. You may need to perform other actions to accommodate the requirements of a particular verification point implementation.
Note that the verification point framework does much of the work that is required to perform a verification point.
To set up a static verification point:
The following sections provide information to help you perform these steps.
The specialized IVerificationPoint
class encapsulates a verification point's metadata. Metadata includes the following kinds of information:
You can specify verification point metadata either explicitly or implicitly:
set...
methods in the specialized IVerificationPoint
class.
Verification points that you generate through a Rose model are defined explicitly -- that is, the metadata is set through calls to the verification point's set...
methods.
Note: Because explicitly provided metadata can be assigned to test script variables, you can use datapools to supply metadata information to your test scripts.
DefineVP
method. This method runs a user-defined UI that prompts the tester for the metadata information. (The UI is developed by the verification point implementer.) After the metadata is captured, the framework writes the metadata to the datastore.
Note: Because implicitly provided metadata is retrieved from the datastore rather than being assigned to test script variables, you cannot use datapools with this type of metadata.
For more information about how to provide verification point metadata, see IVerificationPoint Interface.
To execute a verification point, call the PerformTest
method in the specialized IVerificationPoint
class, as follows:
PerformTest
method.
0
to the PerformTest
method.
Using the metadata in the specialized IVerificationPoint
class, the framework captures the actual data for the test. The framework also checks the datastore for an expected (baseline) data object to compare against the actual data:
However, if no expected data object exists and you have included the VPOPTION_USER_ACKNOWLEDGE_BASELINE
option in the SetOptions()
method, the framework first invokes an implementer-defined UI that prompts the tester to verify that the captured data is correct.
If the tester accepts the displayed data as being correct, the framework stores the data object in the datastore as the expected data for subsequent tests. If the tester rejects the displayed data, the framework logs an error, and verification point execution ends. No expected data object is stored.
For an example of a static verification point setup in a test script, see Example of a Static Database Verification Point.
Setting up a dynamic verification point is similar to setting up a static verification point. However, before the test script executes the verification point, the test script must create the expected data object. The framework is responsible for capturing and building the actual data object, just as it does for a static verification point.
You create the expected data object using the appropriate implementation of the IVerificationPointData
interface.
After you create the expected data object, you can pass it to the PerformTest
method when you execute the verification point.
For an example of a dynamic verification point setup in a test script, see Dynamic Database Verification Point Example.
Setting up a manual verification point is similar to setting up a static verification point. However, before the test script executes the verification point, the test script must create both the expected and actual data objects.
You create the expected and actual data objects using the appropriate implementation of the IVerificationPointData
interface.
After you create the expected and actual data objects, you can pass them to the PerformTest
method when you execute the verification point.
Rational Test Script Services for Visual Basic | Rational Software Corporation |
Copyright (c) 2003, Rational Software Corporation | http://www.rational.com support@rational.com info@rational.com |