Exercise 3: Creating and Adding Requirements to a Test Plan

In this exercise, you will learn how to create a new requirement and add that requirement to your test plan. You will also learn how to create a new test case for the new requirement.

  1. In Microsoft Test Manager 2010, select the Plan tab and select the Contents link to view the new Release 2.0 test plan if it is not already open.

    Figure 32

    Test plan contents window for Release 2.0

  2. Create a new user story work item by selecting the New dropdown box and selecting User Story.

    Figure 33

    Creating new user story work item

  3. For the Title of the user story, enter “As a consumer, I want to be able to add a coupon code to my purchase”.
  4. For the Risk of the user story, select the “2-Medium” option from the dropdown box.
  5. Select the Save and Close button to continue.

    Figure 34

    Define and save new user story

  6. In the test plan contents window, select the Release 2.0 node and then select the Add requirements button to add a new requirement to the plan.

    Figure 35

    Adding a new requirement to the test plan

  7. In the window titled “Add existing requirements to this test plan”, select the grid row labeled Click here to add a clause (the row showing * at the beginning) to add a new query clause that restricts work items to those under the “Tailspin Toys\Web site” area path. Use the values shown in the following screenshot.

    Figure 36

    Adjusting the query to help find the recently created user story

  8. Select the Run button to see the results of this query. You should see the new user story that you just created.

    Figure 37

    Location of Run button

  9. Select the user story (as a requirement) and then select the Add requirements to plan button. This will close this window and return to the test plan contents window.

    Figure 38

    Selecting and adding the new user story as a requirement

  10. In the test plan contents window, you should now see the new requirement-based test suite listed. Its icon is different from the other two test suites to indicate that it is a requirement-based test suite. In the right pane, there are options to either link existing test cases or create new test cases.
  11. Select the New button in the right pane to create a new test case.

    Figure 39

    Creating a new test case for the user story requirment

  12. For the Title of the new test case, enter “Add coupon code during checkout”. Note that the Area and Iteration values in the Classification section have already been correctly pre-populated.

    Figure 40

    Creating new test case and assigning properties

  13. Enter the Steps for the new test case as shown in the screenshot below.

    Figure 41

    Creating steps for new test case

  14. Select the Save and Close button to save the new test case and return to the test plan contents window.

    Figure 42

    Location of Save and Close button

  15. In the test plan contents window, you should now see the new test case that was added to the requirement-based test suite.

    Figure 43

    Requirement-based test suite showing the new test case

To give feedback please write to VSKitFdbk@Microsoft.com

Copyright © 2010 by Microsoft Corporation. All rights reserved.