Exercise 4: Creating Shared Steps

In this exercise, you will learn how to create shared steps. A shared step combines multiple steps that are commonly performed in sequence into a single logical step, which can be shared across tests. If the process defined by the shared steps ever changes in the future, you can update the shared step in one place and it will be reflected in all tests that reference it.

  1. In the right pane, click Open test case to open the selected test.

    Figure 1

    Location of “Open test case” button

  2. In the Steps panel, click on the second step “Click Model Airplanes” to select it. Next, hold the Shift key and then click the step “Click Add to Cart” so that steps 2 -4 are selected.
  3. Right-click the selection and select Create shared steps from the context menu that appears.

    Figure 2

    Creating shared steps

  4. In the Create Shared Steps dialog, enter “Add Northwind Trader to Cart” as the Title and then click the OK button.

    Figure 3

    Step 2 now refers to the shared steps that we just created

  5. Right-click the shared step and select Open shared steps. You can now edit the shared steps as needed.

    Figure 4

    Viewing shared steps

  6. Click Save and Close to save the shared steps.
  7. Click Save and Close to save and close the test.

To give feedback please write to VSKitFdbk@Microsoft.com

Copyright © 2010 by Microsoft Corporation. All rights reserved.