background image
<< Templates for Stub Generation - COM/VB | Datapools in Unit Tests >>
<< Templates for Stub Generation - COM/VB | Datapools in Unit Tests >>

Test Script Services

Test Script Services
Test Script Services
Rational Test Script Services provide datapool, logging, verification, synchronization,
measurement, and monitoring capabilities to various Rational applications, including
A datapool is a set of records that you can use to drive a test script. Typically, each
record in the datapool represents a test case and includes the test inputs and the
expected results. With a datapool, a single script can iterate through multiple test
cases. If you want to add a new test case, such as the result of invalid input, you only
need to add another record to the datapool.
For example, suppose you want to test an
operation that takes two integers as
parameters. If you want to test what happens when you pass it two negative integers,
you can simply add another record to the datapool. Include negative integer values in
each of the two parameter columns, and populate the expected result or expected
exception columns accordingly.
Datapools greatly reduce the number of test scripts that are required and minimize
script maintenance.
Datapools in Scenario Tests
When you generate a scenario test from Rose, QualityArchitect creates a datapool
automatically. It examines each message in an interaction diagram and populates one
datapool row with data based on the parameter values in the messages. If no
parameter values are found in the messages, QualityArchitect attempts to populate
the row with initial values found in the parameter specification.
QualityArchitect creates a datapool column for each unique parameter in each
message in the diagram. For example, as shown in the following figure, if the first
message included in the script has four unique parameters, and the second message
has two unique parameters, the datapool will have at least six columns. In addition,
each verification point contributes several columns of data to the datapool. The initial
data for these verification point columns is extracted from the values entered into the
Query Builder wizard.