IBM Rational Functional Tester
Version 6.1
IBM Rational Functional Tester API Reference

Project Version 2.0

Package com.rational.test.ft.vp

The package com.rational.test.ft.vp provides verification point services to test scripts.

See:
          Description

Interface Summary
IFtVerificationPoint Serves as the verification-point operational interface.
IFtVerificationPointData Represents the core abstraction for static and dynamic verification-point data.
ITestData Provides base-level support for verification-point data returned from a proxy object.
ITestDataElement Encapsulates a generic element used in an ITestDataList.
ITestDataElementList Used by the ITestDataList interface to encapsulate the ordered set of generic elements that make up the desired list.
ITestDataList Represents the elements in a list-type object for a verification-point operation.
ITestDataMenu Represents the necessary methods for supporting a menu-type verification point.
ITestDataProperties Defines the methods necessary for maintaining the properties associated with a single TestObject in the software under test.
ITestDataTable Represents a table of test data.
ITestDataTableRegion Represents a region of a corresponding table.
ITestDataText Represents the necessary methods for supporting a text-type verification point.
ITestDataTree The base-level tree verification-point interface.
ITestDataTreeAttributes Represents the necessary methods for supporting a tree node within a tree-type verification point.
ITestDataTreeNode Provides the necessary methods for representing a node in a Tree test-data object.
ITestDataTreeNodes Enables an appropriate display object to be associated with the tree nodes.
ITestObjectDescriptor Defines an abstract reference to an object in the software under test.
 

Class Summary
VpUtil Provides a default set of utility methods that can be used to create interesting data objects.
 

Exception Summary
VerificationPointException Signals an exception in verification-point processing.
 

Package com.rational.test.ft.vp Description

The package com.rational.test.ft.vp provides verification point services to test scripts.

About verification points

This package contains interfaces that you can use to establish verification points in your test scripts. Verification points test, that is, verify, the state of a system under test after an operation. Verification points are used in both functional and component testing. For example, verification points would be useful for verifying that a banking application correctly calculates a monthly mortgage payment for a given set of inputs such as loan amount, interest rate, and life of loan.

Framework for using verification points

The com.rational.test.ft.vp package includes the primary interface specification that is returned by all the script-based commands. This interface, IFtVerificationPoint, is the framework used by verification points. The ITestData and related interfaces define the data specification returned by TestObjects accessible from the test scripts.

The performTest method

The performTest method performs most of the work on verification points. When this method performs verification point tests, it executes several steps in sequence, beginning with loading the baseline all the way through to logging the result. The performTest method performs these actions:

  1. Loads the baseline data from disk and caches it as the expected data, unless this is a manual test that supplies the expected value.
  2. Constructs the actual data for non-manual tests.
  3. Compares the expected result to the actual.
  4. Persists the actual data to the log location.
  5. Persists the expected data to the log location.
  6. Logs the result of the comparison in the log.

The net result of these steps is that performTest persists expected and actual verification point data instances to the log directory. It also makes an appropriate entry into the log file. If for any reason these actions cannot be performed, performTest throws an appropriate exception. For example, if performTest cannot read from or write to a baseline file, it may throw an I/O exception.

Other methods in this interface

Other methods in this interface include the following:

Verification point data types

A verification point operates on two different types of data:

A verification point compares the expected data to the actual data. If the data matches or satisfies some other condition, such as falling within an accepted range, the verification point passes. Otherwise, the verification point fails. Verification point results are automatically logged in the LogViewer.

Verification point types

The verification point framework in this package provides five types of verification points, which are summarized below:

Verification Point Types

Expected (or Baseline) Data Object

Actual Data Object

Static Verification Point

Recorded into the script

Captured at script playback

Manual Verification Point (one data source)

The actual from the first run

Test script passes to verification point

Manual Verification Point (two data sources)

Test script passes to verification point

Test script passes to verification point

Dynamic Verification Point (no Test Object supplied)

Recording-style capture from first run

Captured at subsequent script runs

Dynamic Verification Point (with supplied Test Object)

Recording-style capture from first run against the one test object

Captured at subsequent script runs

Static verification points

With static verification points, baseline data must already exist before performTest can execute. The performTest method performs a verification-point test, which includes all required steps, from loading the baseline to logging the result. As a consequence, the expected and actual verification-point data instances are persisted to the log directory. Recorder automatically records static verification points. Therefore, these verification points are defined not by the script, but by the recorder. The script then references the verification points recorded by the recorder. The data type of all static verification points is IFtVerificationPointData.

Manual verification points

Manual verification points require that you supply any necessary data before performTest can be executed.

This verification point form has several unique characteristics:

Dynamic verification points

Dynamic verification points bring up a user interface that enables you to insert a verification point during recording. That is, while performTest executes, you can perform actions, such as inserting a verification point. The advantage is that you do not have to manually drive the software under test to the appropriate state before recording the verification point.

Dynamic verification points have the following characteristics:

Since:
RFT1.0