<< Copying Test Steps | Cruise Booking test >>
<< Copying Test Steps | Cruise Booking test >>
Calling Tests with Parameters
TestDirector Tutorial
4 Paste the steps to the Cruise Search test.
In the test plan tree, under the Cruise Reservation folder, select the Cruise
Search
test.
In the Design Steps tab, click the Paste Steps button. The test steps appear
in the Design Steps tab.
Calling Tests with Parameters
When you design test steps, you can include a call to a manual test. When
you run the test, the test steps include the steps from the called test as part
of the test. Generally, the test that you call is a template test. A reusable test
that can be called by different tests. A template test generally includes
parameters. A parameter is a variable that replaces a fixed value and can be
assigned a value from outside the test in which it is defined. You can change
the value of a parameter in a test according to the test that is calling it, or for
different instances of a test.
For example, suppose you have a template test which logs in a user with a
specific password when you start your application. You need to call this test
at the beginning of each test. In some cases, you will want to log in as a
regular user while in others, you will need to log in as the administrator. You
can therefore create two parameters, <<user name>> and <<password>>, and
change the value according to which type of test is calling your template
test.
In "Designing Test Steps" on page 31, you created a test for booking a cruise.
In the following exercise, you will enhance your test by calling the Connect
And Sign-On test. This is a template test which includes parameters for the
Mercury Tours URL address, and the user name and password for logging in
to the site.
36