It is sometimes useful for a tester to have different types of tests run sequentially. For example, a tester might want to delete certain items from the application database with an API invocation before running a performance or functional test. A compound test in Rational Test is meant for such requirements. In such cases, it is required to pass in information to the API test from the compound test level. This blog shows how to run a compound test containing API tests from RPT. This blog also provides the steps to pass variables defined in Rational Test Performance as arguments to the API tests.
The steps for running a compound test with variables mapped to test variables apply to RFT as well.
The RIT Project
Before running a compound test that consists of API tests, we must have something to run. We created a project based on the calculator WSDL example that's shipped with Quality Server. This example has five services: Add, Divide, Modulus, Multiply, and Subtract.
For RPT to pass arguments to these tests, the arguments for the test must be assigned by tags. This is done easily by tagging the two arguments. Once tagged, we'll see the tag store for the test that contains a Value1 and Value2 entry.
Here are the arguments used by AddTest. The other four tests will be tagged in the same way.
In addition, once tagged, we need to modify the tags. So, select "Expose as input" and clear "Confine scope to this test". Initialize the tags with a default value as well.
After adding the tags, they'll appear in the test's tag store as shown in the following screenshot.
An extra logging step was added to log the input arguments and result of the operation to a text file by configuring the logging action to use a file:
C:\temp\compound\result.txt.