Verification Point Framework Reference |
An implementation of this interface must contain 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 connection string for connecting to a target database and the SQL statement for querying the database.
Don't confuse metadata with the data being verified. The data being verified is encapsulated by an implementation of the interface IVerificationPointData
.
A verification point's metadata can be defined in either of these ways:
set...
methods in your specialized IVerificationPoint
interface.
If the metadata has not been explicitly specified and no metadata exists for this verification point in the datastore, the framework calls the DefineVP
method in your specialized IVerificationPoint
interface. Your implementation of this method should provide some means of retrieving the verification point's metadata-- typically through some UI that prompts the tester for the information. When the metadata is retrieved, the framework stores it in the datastore.
For more information about specifying metadata, see Step 1. Specify the Metadata for the Verification Point.
An implementation of this interface must also implement its own serialization. By requiring your specific verification point implementations to perform their own serialization, you can support all file formats (such as INI and XML).
Note: The current release only supports the .vpm
and .ini
formats.
IVPFramework
extends IVPDispatch
.
Commonly used with QualityArchitect.
QualityArchitect is required for use of this interface.
This interface contains the following property:
This interface contains the following methods:
CodeFactory
GetConstructorInvocation Declares a variable for the verification point being constructed.
CodeFactory
GetExternalizedInputDecl Declares a variable for each value being input programmatically to the constructor.
CodeFactory
GetExternalizedInputInit Initializes a variable for each value being input programmatically to the constructor.
CodeFactory
GetNumExternalizedInputs Specifies the number of responses (inputs) that a tester provided when defining verification point metadata interactively through a UI.
CodeFactory
GetNumPropertySet Specifies the number of calls to
CodeFactoryGetPropertySet
that are required to fully specify the verification point's definition.
CodeFactory
GetPropertySet Sets a given property for the verification point.
DefineVP
Provides a way to capture the metadata for the verification point -- typically, by presenting the tester with a UI device, such as the Query Builder tool provided with QualityArchitect (for use with the database verification point).
Note: For more information about these code factory methods, see The Code Factory Methods.
Declares a variable for the verification point being constructed.
CodeFactoryGetConstructorInvocation
(Language
As CTDScriptTypes) As String
Language
The language of your verification point implementation. Valid values include:
A string containing a declaration for this verification point type. The declaration is syntactically correct for the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
This method provides a constructor call. This call plus the variables declared by CodeFactoryGetExternalizedInputDecl
and set by CodeFactoryGetPropertySet
allow the QualityArchitect code generator to create a fully specified verification point in the generated test script code.
For information about the QualityArchitect code generator, see the Generating Test Assets in the Rational QualityArchitect online documentation.
Declares a variable for each value being input programmatically to the constructor.
CodeFactoryGetExternalizedInputDecl
(Language
As CTDScriptTypes,InputNumber
As Integer) As String
A line of code that declares the variable indicated by InputNumber
. The code is syntactically correct for the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
The Rose scenario test generator calls this method in a loop that iterates as many times as there are variables to declare (that is, the number retrieved from CodeFactoryGetNumExternalizedInputs
).
Variables declared with this method are used in the code generated by CodeFactoryGetPropertySet
and CodeFactoryGetExternalizedInputInit
.
Initializes a variable for each value being input programmatically to the constructor.
CodeFactoryGetExternalizedInputInit
(Language
As CTDScriptTypes,InputNumber
As Integer) As String
A line of code that initializes the variable indicated by InputNumber
. The code is syntactically correct for the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
The Rose scenario test generator calls this method in a loop that iterates as many times as there are variables to initialize (that is, the number returned from CodeFactoryGetNumExternalizedInputs
).
Variables initialized with this method are declared by CodeFactoryGetExternalizedInputDecl
and used by CodeFactoryGetPropertySet
.
Specifies the number of responses (inputs) that a tester provided when defining verification point metadata interactively through a UI. The UI was presented to the tester through the DefineVP
method.
CodeFactoryGetNumExternalizedInputs
(Language
As CTDScriptTypes) As Integer
Language
The language of your verification point implementation. Valid values include:
The number of tester inputs that require variable declarations to be made in the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
Specifies the number of CodeFactoryGetPropertySet
calls that are required to fully specify the verification point's definition.
CodeFactoryGetNumPropertySet
(Language
As CTDScriptTypes) As Integer
Language
The language of your verification point implementation. Valid values:
The number of calls that are required to CodeFactoryGetPropertySet
.
NumProps
represents the total number of properties that need to be set for the verification point. Each property is set through a separate call to CodeFactoryGetPropertySet
in syntax appropriate for the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
Sets a given property for the verification point.
CodeFactoryGetPropertySet
(Language
As CTDScriptTypes,InputNumber
As Integer) As String
A line of code that sets the property indicated by InputNumber
. The code is syntactically correct for the specified language.
This method is never called from the test script. This method is called when a test script is generated from a Rose model.
The Rose scenario test generator calls this method in a loop that iterates as many times as there are properties to set (that is, the number retrieved by CodeFactoryGetNumPropertySet
).
Provides a way to capture the metadata for the verification point -- typically, by presenting the tester with a UI device, such as the Query Builder tool provided with QualityArchitect (for use with the database verification point).
DefineVP
()
The framework automatically invokes this method if the verification point is not fully defined when the PerformTest
method is invoked.
When DefineVP
is invoked, it should capture, presumably through some UI, any information necessary to fully define the metadata for the verification point, and then populate the verification point's attributes with the captured metadata. For example, the DefineVP
method included with the database verification point provided with QualityArchitect invokes the Query Builder software. Query Builder captures the connection string for the target database plus a SQL statement, and then populates the database verification point object with the captured metadata, resulting in a fully defined verification point.
This method applies to the verification point metadata, not to the data itself that is captured in accordance with the metadata. The specialized Verification Point Data Provider interface uses the metadata to determine which data to capture.
If the verification point is being generated through a Rose model, this method is invoked at script generation time. The resulting verification point metadata will automatically be provided to the test script. As a result, the DefineVP
method will not be invoked at script playback time.
Implement this method only if you are implementing a new 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 |