Complete Tutorial Mercury Quality Center Part4

Posted on Nov 27 2007 - 9:52am by Raj

Adding Tests to a Test Set :

Once you have defined a test set, you can add copies of tests from the project to your test set. In the following exercise, you will add tests to the Mercury Tours Demo test set.

To add a test to a test set:

1 Display the Test Lab module.

Click the Test Lab tab.

2 Display the Execution Grid tab.

Select the Mercury Tours Demo test set from the Test Sets list.

Click the Execution Grid tab.

3 Display the test plan tree.

Click the Select Tests button. The right window pane displays the test plan tree.

4 Add the Cruises folder to the test set.

Select the Cruises folder, and click the Add Tests to Test Set button.

The Parameter dialog box opens if a test that you are adding to a test set has an unassigned parameter value. You can assign a value now, or later when you run the test. For the purpose of this exercise, click OK to close this dialog box. You will assign this parameter value when you run the Cruise Booking test (see "Running Tests Manually" on page 61).

TestDirector adds all the tests in the folder to the test set.

5 Add the Airline Preference test to the test set.

To search for the test, type Airline in the Find box, and click the Find button. TestDirector highlights the Airline Preference test in the test plan tree.

Click the Add Tests to Test Set button. TestDirector adds the test to the test set.

6 Add the Number of Passengers test to the test set.

To search for the test, type Number of Passengers in the Find box, and click the Find button. TestDirector highlights the test in the test plan tree.

Click the Add Tests to Test Set button. TestDirector adds the test to the test set.

Tip: You can also add tests by dragging a folder or test in the test plan tree to the Execution Grid or Execution Flow.

7 Close the test plan tree window pane. Click the Close button.

Scheduling Test Runs

You can specify a date and time, and set conditions for executing a test in the Execution Flow tab. A condition is based on the results of another specified test in the Execution Flow. By setting conditions, you can instruct TestDirector to postpone execution of the current test until the other specified test has either finished running or passed. You can also set the sequence in which to execute the tests.

For example, suppose you schedule to run Test 2 only after Test 1 has finished, and run Test 3 only if Test 2 passed. You can also schedule Test 1 and Test 2 to run a day before Test 3. Unlike the Execution Grid, which displays the tests with only test run information, the Execution Flow displays the tests with conditions in a diagram.

A dashed line arrow indicates a test with no conditions. A solid line arrow indicates a condition and can be blue or green. If the solid line is blue, it indicates that the condition status is set to "Finished". If the solid line is green, it indicates that the condition is set to "Passed". When a test is time-dependent, a Time Dependency icon is added to the diagram.

In the following exercise, you will create a new test set, and add to it three tests that verify the login procedure on the Sign-On page of the Mercury Tours site. Then, you specify under what conditions you want to run each test and when.

To schedule a test run:

1 Create a test set for this exercise.

In the Test Lab module, click the Execution Flow tab.

Click the New Test Set button. The New Test Set dialog box opens.

In the Test Set Name box, type: Test Run Schedule.

In the Description box, type: 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 list in the left window pane, and the right window pane displays the test plan tree.

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

To search for the Sign-On/Sign-Off folder , type Sign in the Find box, and click the Find button. TestDirector highlights the Sign-On/Sign-Off folder in the test plan tree.

Select the Sign-On Page test. Click the Add Tests to Test Set button. TestDirector adds the test to the test set.

Drag the Sign-On User Name test to the Execution Flow area.

Drag the Sign-On Password test to the Execution Flow area.

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

Right-click the Sign-On User Name test and choose Test Run Schedule. The Run Schedule of Test dialog box opens and displays the Execution Conditions tab.

Click New. The New Execution Condition dialog box opens.

In the Test box, select Sign-On Page.

Select Passed to instruct that the Sign-On User Name be executed only if the Sign-On Page test has finished executing and passed.

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

4 Add a time dependency condition to the Sign-On User Name test. Click the Time Dependency tab.

Select Run At Specified Time, and select tomorrowÂ’s date from the Date box.

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

5 Add an execution condition to the Sign-On Password test.

Add the same execution condition as described in Step 3 on page 57 for the Sign-On Password test. This time select Sign-On User Name from the Test box in the New Execution Condition dialog box.

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

Add the same execution condition as described in Step 4 on page 59 for the Sign-On Password test.

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

7 Rearrange the tests in a hierarchical layout.

To clearly view dependencies between different tests, click the Arrange Tests Sequentially button.

About the Author

Leave A Response