In the previous lesson, you edited the test script, (Engineering Test Management Tutorial) Allocate Dividends to
Multiple Causes, by adding test data to a statement. In this lesson, you continue as the tester and
create and add a test execution variable.
About this task
You can use an execution variable to provide consistent values in test runs.
In this lesson, you create a test execution variable and add it to the test case that is associated
with that test script. When the execution variable is defined, you can use it to provide a
particular value for any test script that is associated with that test case.Create an execution
variable in a test case and add it to a test script:
Procedure
-
If you are not already logged in as the tester, log in by entering tanuj
as both the user ID and password.
-
Return to the
(Engineering Test Management Tutorial) Donor can choose to support multiple organizations
test
case.
Tip: If the test case is not already open, click . In the section that opens, click (Engineering Test Management Tutorial) Donor can choose to
support multiple organizations.
-
Open the Execution Variables section of the test case.
-
Create an artifact execution variable:
-
For the type, select Artifact Variable.
-
Click Create Execution Variable.
-
Name the variable Authenticator code and enter its value as
5309.
-
Click Create, and then click Save.
A new artifact execution variable, Authenticator code, is added to the test
case.
-
Add the execution variable to the test script:
-
Open the
(Engineering Test Management Tutorial) Allocate Dividends to Multiple Causes
test script.
Because the script is associated with this test case, you can find it in the Test Scripts
section of the test case.
-
Click the Show Execution Variables View icon. For the type, select
Artifact Variable, and then click Create Execution
Variable.
-
Pass the test case execution variable value to this script by reusing its name here. In the
Name field, enter Authenticator code. Leave the
Value field blank.
-
In step 4 of the test script, highlight the code 0000. In the
Execution Variables view, select check box next to the Authenticator code
variable. Then, click Insert Execution Variables in Current Step.
-
Save the test script.
The execution variable is added to the test script.
Results
An artifact execution variable is created in the test case. That variable is also added to a
test script that is associated with the test case. Later, during test execution, the variable value
that was defined in the test case is shown in the test script step where you inserted the
variable.
Lesson checkpoint
n this lesson, you learned how to do these tasks:
- Create an execution variable.
- Insert an execution variable into a test script.
What to do next
In the next lesson, you continue as the tester to create a keyword from existing steps in a
script and replace the steps with the keyword.