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:

  1. Make sure the Test Lab module is displayed.

    On the ALM sidebar, under Testing, select Test Lab.

  2. Create a new test set.

    1. 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.

    2. Type the following:

      Name: Test Run Schedule

      Description: This test set is used to explain how to schedule a test run.

    3. Click OK. The Test Run Schedule test set is added to the test sets tree in the left pane.

  3. Add tests from the Sign-On/Sign-Off folder to the Test Run Schedule test set.

    1. 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.

    2. In the Test Plan Tree tab, under the Profiling folder, expand the Sign-On/Sign-Off folder.

    3. 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.

    4. Click Close. The test instances are added to the test set.

  4. Add an execution condition to the Sign-On User Name test.

    1. 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.

    2. Click New Execution Condition. The New Execution Condition dialog box opens.

    3. In the Test dropdown list, select [1]Sign-On Page.

    4. 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.

    5. Click OK. The condition is added to the Run Schedule dialog box.

  5. Add a time dependency condition to the Sign-On User Name test instance.

    1. Click the Time Dependency tab.

    2. Click Run At Specified Time. Select the Date check box and select tomorrow’s date.

    3. Click OK to close the Run Schedule dialog box. Your conditions are displayed in the Execution Flow diagram.

  6. 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.

  7. Add a time dependency condition to the Sign-On Password test.

    1. Add the same time dependency condition as described in Step 5 for the Sign-On Password test.

    2. Click OK to close the Run Schedule dialog box. Your conditions are displayed in the Execution flow diagram.