Setting Schedules and Conditions for Test Runs
The Execution Flow tab enables you to specify a date and time to execute a test instance and set conditions for it. A condition is based on the results of another specified test instance in the Execution Flow. By setting conditions, you can postpone the execution of a test instance until another specified test instance finishes running or passes. You can also set the sequence in which to execute the test instances.
For example, you can determine that Test 2 will run only if Test 1 passed, and Test 3 will run only if Test 2 passed. Test 1 is scheduled to run at 9:00 AM on a specified date. The Execution Flow displays the tests and their conditions in a diagram.
A blue line arrow indicates that the test instance is to be executed after the previous test instance, with no conditions. A green line arrow indicates that the test instance is to be executed only if the previous test instance has status Passed. A black line arrow indicates that the test instance is to be executed only if the previous test instance has finished running. When a test instance is time-dependent, a Time Dependency icon is added to the diagram.
In this exercise, you will create a new Default test set and add to it three test instances that verify the login procedure on the Sign-On page of the Mercury Tours site. Then, you will set the conditions for each instance and specify when each one is to be run.
To schedule a test run in the Execution Flow tab:
-
Make sure the Test Lab module is displayed.
On the ALM sidebar, under Testing, select Test Lab.
-
Create a new test set.
-
In the test sets tree, choose the Service Pack 1 folder and click the New Test Set button. The New Test Set dialog box opens.
-
Type the following:
Name: Test Run Schedule
Description: This test set is used to explain how to schedule a test run.
-
Click OK. The Test Run Schedule test set is added to the test sets tree in the left pane.
-
-
Add tests from the Sign-On/Sign-Off folder to the Test Run Schedule test set.
-
Click the Execution Flow tab. If the right pane is not already displayed, click the Select Tests button. The Test Plan Tree tab and the Requirements Tree tab are displayed.
-
In the Test Plan Tree tab, under the Profiling folder, expand the Sign-On/Sign-Off folder.
-
Press the CTRL key and select the following tests: Sign-On Page, Sign-On User Name, and Sign-On Password. Click the Add Tests to Test Set button. The Parameter Values dialog box opens.
-
Click Close. The test instances are added to the test set.
-
-
Add an execution condition to the Sign-On User Name test.
-
In the Execution Flow tab diagram, right-click the Sign-On User Name test instance and choose Test Run Schedule. The Run Schedule dialog box opens and displays the Execution Conditions tab.
-
Click New Execution Condition. The New Execution Condition dialog box opens.
-
In the Test dropdown list, select [1]Sign-On Page.
-
Select Passed from the list on the right to instruct ALM to execute the Sign-On User Name test instance only if the Sign-On Page test instance finishes executing and passes.
-
Click OK. The condition is added to the Run Schedule dialog box.
-
-
Add a time dependency condition to the Sign-On User Name test instance.
-
Click the Time Dependency tab.
-
Click Run At Specified Time. Select the Date check box and select tomorrow’s date.
-
Click OK to close the Run Schedule dialog box. Your conditions are displayed in the Execution Flow diagram.
-
-
Add an execution condition to the Sign-On Password test.
Add the same execution condition as described in Step 4 for the Sign-On Password test. This time select Sign-On User Name from the Test box in the New Execution Condition dialog box.
-
Add a time dependency condition to the Sign-On Password test.
-
Add the same time dependency condition as described in Step 5 for the Sign-On Password test.
-
Click OK to close the Run Schedule dialog box. Your conditions are displayed in the Execution flow diagram.
-