Previous Topic: Integrate Server-Side ComponentsNext Topic: Integrators


Collect Transaction Information

The TransInfo class encapsulates all the information that is gathered about the execution of a specific "transaction" of the system under test. This class informs the running test case of the status of this transaction. The DevTest instance requesting this transaction works with this object. A transaction is a round trip from a test instance to the system under test and back. Transactions can be broken up into subcomponents and reported at that level with the CompInfo object.

To construct a TransInfo object, call the startTransaction method on the appropriate integrator. For example, the following code creates a TransInfo in a servlet:

TransInfo ti = si.startTransaction( "Hello World" ); 

For more information about the TransInfo class, see the JavaDocs in the doc folder of your installation directory.

 

Build Status

The TransInfo class provides a method, setBuildStatus, that lets you specify information that the system can use to determine how to run the test. The setBuildStatus method takes a string constant whose possible values are defined on the TransInfo class. Status constants include:

For more information about the TransInfo class, see the JavaDocs in the doc folder of your installation directory.

 

Assertion Methods

The TransInfo class provides several methods that make assertions, and then take some action if the assertion fails. The Assertion methods include:

For more information about the TransInfo class, see the JavaDocs in the doc folder of your installation directory.