Verification Services |
The com.rational.test.vp
package includes the pre-defined database verification point for verifying data in a JDBC database. This is typically the verification point you use in writing scripts for EJB testing.
If you need to use other kinds of verification points, the verification point implementer must first extend and implement the class and interfaces in the verification point framework provided in the com.rational.test.vp
package.
The verification point framework contains the following class and interfaces:
VerificationPoint
class
VerificationPointData
interface
VerificationPointDataProvider
interface
VerificationPointDataRenderer
interface
VerificationPointComparator
interface
For details about the framework, see Verification Point Framework Reference.
Conceptually, a verification point is made up of the following five classes:
VerificationPoint
abstract class.
This class contains the verification point's metadata -- that is, the information that determines the data to capture for this verification point. Examples of verification point metadata include the list of properties for a user-defined object properties verification point, or connection information and SELECT statements for the JDBC database verification point that is included in this package. This class is also responsible for implementing its own serialization. By requiring your specific verification point implementations to perform their own serialization, you can support all file formats (such as INI, XML, and standard Java serialization).
VerificationPointData
interface.
This class encapsulates and serializes a single snapshot of either expected or actual data. An instance of this class can be populated by the captureData()
method of a VerificationPointDataProvider
class, or it can be populated manually in the test script -- for example, by literal values or by values from a datapool. Each implementation of the VerificationPointData
interface is required to provide its own serialization methods, once again for support of all possible file formats.
Note: For the current QualityArchitect release, Verification Point Data classes must serialize to a .CSV file format. This restriction will be removed in a future release of QualityArchitect.
VerificationPointDataProvider
interface.
This class is a pluggable link between a Verification Point class (which defines a verification point's metadata) and a Verification Point Data class (which stores data for a verification point). Specifically, this class implements the captureData()
method to populate a Verification Point Data object for a given Verification Point object.
VerificationPointDataRenderer
interface.
This class provides the capability of displaying the data stored in the Verification Point Data class, allowing the tester to interactively accept or reject that data as a baseline for a static verification point. To enable this capability, the test designer specifies the OPTION_USER_ACKNOWLEDGE_BASELINE
option in the setOptions()
method of the Verification Point class being implemented.
VerificationPointComparator
interface.
This class provides a method to compare two VerificationPointData
objects and determine if the comparison succeeds or fails. The comparison can test for equality between the expected and actual data, or it can test for some other condition (for example, that the actual data falls within a given range).
The following figure summarizes the verification point classes:
Rational Test Script Services for Java | Rational Software Corporation |
Copyright (c) 2003, Rational Software Corporation | http://www.rational.com support@rational.com info@rational.com |