Export (0) Print
Expand All

Creating and Defining a Test Plan

A test plan lets you specify what you want to test and how to run those tests. A test plan can be applied to a specific iteration of your project. You can have just one default test suite for your test cases, or you can create a test suite hierarchy.

Requirements

  • Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

You can also select the default configurations to use to run the tests in your test plan. The test configuration informs the tester of the set up that is required for these tests. You can have one or multiple default configurations. A test result is recorded every time that you run the test with a specific configuration. A test plan enables you to measure your testing progress, based on these test results for the test and configuration pairings, as shown in the following illustration.

Key Components of a Test Plan
Note Note

You can also assign default configurations at the test suite level if specific test suites need different configurations from the overall plan.

If you require specific test configurations for your test plan, it is easier to create your test configurations first. If you do this, you can select the default configurations for your plan and when you add test cases, the pairings between the test case, and each default configuration are automatically set up. You can update these pairings later if you want. For more information about how to create test configurations, see How to: Create Test Configurations.

Note Note

You do not have to define configurations. You can just use the default configuration that is provided.

You can also define default test settings for your test plan. These test settings determine how your tests will be run. Test settings enable you to do many tasks automatically such as collect information about the actions that are performed when you are testing, record these actions, make a video recording, and collect system information or code coverage data. You can also use test settings to run your automated tests remotely, using specific environments.

You can override the default test settings in your plan when you select tests to run. For more information about test settings and environments, see Setting Up Machines and Collecting Diagnostic Information Using Test Settings and Setting Up Test Machines to Run Tests or Collect Data.

Note Note

You do not have to define test settings for manual tests. You can use the default setting, which is Default, and your manual tests will just run on a local computer.

After creating a test plan, you might want to review the test plan to check that the test cases cover the key functionality of the application. This may be easier to accomplish by using a Microsoft Word document that you have created. You can use the Test Scribe power tool to create a word document from your test plan. Using this word document anyone can review the test cases in the test plan without having to open each test case.

Use the following procedures to create a test plan:

Some of the properties that you can set for a test plan are shown in the following illustration:

Plan Properties

To create a test plan

  1. Open Microsoft Test Manager.

    Note Note

    To display the Microsoft Test Manager window, choose Start, and then choose All Programs. Point to Microsoft Visual Studio 2012 and then choose Microsoft Test Manager.

  2. To create a test plan, choose the down-arrow on the center group switcher and then choose Testing Center.

  3. Choose the current plan name displayed in the upper right hand corner.

    The Testing Center dialog box is displayed.

    Note Note

    You can also manage test plans, including creating test plans, from the Test Case Manager in the Organize view.

  4. To create a plan, choose Add.

    The Add test plan dialog box is displayed.

  5. Type the name for your plan in Enter the plan name, and then choose Add.

    Your plan is now added to the list and highlighted.

  6. To select the plan you added to use, choose Select plan.

    The Contents view for your test plan is now displayed.

  7. To change to the properties view for your test plan, choose Properties.

  8. (Optional) In Description type the description of the test plan.

  9. (Optional) To change the owner, choose Owner and then select the new owner.

  10. Choose State and select from the list of states, based on the following table:

    State

    When to use it

    Active

    When you are planning or running the tests in the test plan.

    Inactive

    When you have completed the test plan.

    Important note Important

    To view the test plan or run tests, you must set the status of a test plan to Active. If a test plan is in an inactive state, you cannot view the test plan and edit it in the Plan view. You can only access it from the Test Plan Manager.

  11. (Optional) In Start date type the day that you want the test plan to begin and in End date type the date that the test plan will be completed.

    Note Note

    These dates do not affect the state of the test plan.

  12. To select the area of your team project that this test plan covers, choose Area.

  13. To select the iteration for running the tests in your test plan, choose Iteration.

    Note Note

    The iterations are set up in your team project by the Team Foundation Server administrator.

  14. (Optional) To select the test settings to use for any manual tests in this test plan, choose Test settings under Manual runs.

    Note Note

    You can select from test settings that have already been created, or you can select New from the list to start the test settings wizard to create new test settings. For more information about test settings, see Setting Up Machines and Collecting Diagnostic Information Using Test Settings and How to: Create Test Settings for a Test Plan.

  15. (Optional) To view an existing test settings to confirm it is correct, or to update a test setting, select the test settings in the list and then choose Open.

  16. (Optional) To select the test settings to use for any automated tests in this test plan, choose Test settings under Automated runs.

    Note Note

    You might want to use different test settings to specify how to run your automated tests because you may choose to run them on a different set up than your manual tests. For more information about how to run automated tests, see Setting Up Test Machines to Run Tests or Collect Data and Create Test Settings for Automated System Tests Using Microsoft Test Manager.

  17. (Optional) To select the default configurations to use for any test suites that you add into your test plan, choose In this plan under Configurations.

    The dialog box is displayed. It shows all the configurations for your team project and the current default configurations for your test plan.

    Note Note

    By default, a configuration called Windows 7 and IE 8 has been created and is selected for use with your test plan.

  18. (Optional) Select the default configurations that you want to add and any that you want to remove.

    Note Note

    Changing the default configurations only affects new test cases that are added to your test plan. For more information about how to change the pairings of tests and configurations that are already in your test plan, see the procedure about updating configurations for specific test cases.

  19. (Optional) To add a new configuration, choose Manage.

    The Test Configuration Manager activity is displayed. For more information about how to create configurations using the test configuration manager, see How to: Create Test Configurations.

  20. (Optional) To save your changes to the default configurations, choose Apply.

  21. (Optional) To select the build definition and the build quality that you will use to test, choose the drop-down arrow for Filter for builds. These builds refer to any team build definitions that are used to build your application under test.

    The Filter completed builds dialog box is displayed.

    Note Note

    If you are not using Team Foundation Build to build your application, then you do not have to set Build filter or Build in use. For more information about using Team Foundation Build, see Define Your Build Process.

  22. (Optional) To select the build definition that represents the builds you will use for your testing in this test plan, choose Build definition.

  23. (Optional) Each build can be given a specific value to reflect the quality of the build. To select the quality of the build required for your testing in this test plan, choose Build quality.

    Note Note

    For more information about build definitions and build quality, see Define Your Build Process.

  24. (Optional) To save your changes, choose Set build filter.

  25. (Optional) To select the build that you are currently using for testing this test plan, you have to first choose Save to save the changes for the build filter and then choose Modify.

    The Assign Build view is displayed. You can compare your current build with a build you plan to use for testing. The associated items list shows the changes to work items between the builds to help you decide. You can then select a new build to take and use for testing with this plan. For more information about how to select a build, see Determining Which Builds Have Bug Fixes, New Features, or Requirements.

  26. (Optional) To close the Assign Build activity and return to the test plan properties, choose the Close icon.

  27. To save these changes for this test plan, choose Save in the toolbar.

You can create different types of test suites in your test plan, or you can just use the default test suite provided and add your test cases into that one. How to create these different types of test suite is shown in the following illustration:

Create Different Types of Test Suites

This procedure describes creating a test suite and adding existing or new test cases to it. For more information about the different types of test suites and organizing them into a hierarchy, see Organizing Test Cases Using Test Suites.

To create test suites and add test cases

  1. From the Testing Center, choose Plan and then choose Contents.

    The Contents pane is displayed.

  2. To create a new test suite, choose New in the pane that shows the test suite root node.

    Note Note

    The test suite hierarchy has a root node that has the same name as the test plan. You can add test cases or test suites to this test suite root node, but you cannot rename it.

  3. Type the name for your new test suite.

    The name will also be displayed in the test suite details pane.

  4. Choose State and select from the list of states, based on the following table:

    State

    When to use it

    In Planning

    If you are not yet ready to run the tests in this test suite.

    In Progress

    When you are ready to run the tests in this test suite.

    Completed

    When you have finished running the tests in this test suite and the quality level reached meets your goals.

    Important note Important

    To run tests, you must set the status of a test suite to In Progress.

  5. To change the default configurations for the test suite you created, if you want them to be different from the default settings for the plan, choose the drop-down arrow following the list of configurations in the test suite details pane.

    The dialog box is displayed that shows all the configurations for your team project and the current default configurations for your test plan.

  6. You must first clear Use configurations from parent test suite, and then select the default configurations that you want to add and any that you want to remove.

    Note Note

    Changing the default configurations only affects new test cases or test suites that are added to this test suite. For more information about how to change the pairings of tests and configurations that are already in your test plan, see Update configurations for specific test cases.

  7. To add an existing test case to this test suite, choose Add.

    The Add test cases to suite dialog box is displayed. All available test cases are shown in the list of tests.

    Note Note

    Tests that have already been added to the test suite are not shown in the list of tests.

  8. (Optional) If there are several test cases listed, you can narrow your test case search by changing the query for test cases as shown in the following steps.

    1. To add a new clause to your query, select Choose here to add a clause.

    2. Choose each column in the query clause to fill in the clause. If a column has a list of accepted values, a drop-down arrow appears when the column is selected. Choose the drop-down arrow to select a value from the list. The following columns are available:

      Query Column

      How to complete

      And/Or

      Select And if this clause and the previous clause must be true to match a result. Select Or if either this clause or the previous clause must be true to match a result.

      Field

      The list for this field contains all the searchable work item fields used in the current Team Foundation Server. Use as many clauses and fields as you want to get useful results. Press ALT+DOWN ARROW or type the field name that you want to select.

      Operator

      Examples of operator choices are = (equal), <> (not equal to), > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to), In, Was Ever, Was Never, and Contains.

      Value

      Specifies the value that you are looking for in the specified field. If there is a list of values to select from, choose the drop-down arrow to select the one that you want. Team Foundation work item tracking includes some query variables to dynamically add values to your query.

    3. Repeat the previous two steps to add all the values for which you want to search.

    4. To see the results of your query, choose Run to run the query.

  9. Select the tests that you want to add, and then choose Add test cases.

    The test cases that you selected are now displayed in the test suite details pane.

  10. To create a test case and add it to this test suite, choose New.

    The New Test Case dialog box is displayed.

  11. Enter the details for your new test case including the actions and expected results for each test step, and then choose Save and Close.

    The new test case is now displayed in the test suite details pane.

    Note Note

    For more information about how to create new test cases, see How to: Create a Manual Test Case.

  12. Repeat the previous two steps to add more test cases.

    Note Note

    All the existing test cases that you add, or new test cases that you create, are paired with each default configuration to define what tests must be run on which configurations for the test plan. To see these pairings, select the test suite and then choose Configurations.

  13. The changes you have made to the test plan are automatically saved.

You can update the default assignments of test configurations to test cases in each suite. You can remove pairings that you do not want to test and add other combinations. This gives you the flexibility to specify in your plan only those pairings of configurations and test cases that you really want to test as shown in the following illustration.

Update Default Assignments of Test Configurations

To update configurations for specific test cases

  1. From the Testing Center, choose Plan and then choose Contents.

    The Contents pane is displayed.

  2. To change the default assignments of test configurations for a test case, select the test suite that contains the test case.

  3. If you want to be able to change the test configurations for any of the test cases in a test suite, right-click the test suite and select Select test configurations for all tests.

    - or -

    If you want to change the test configurations for specific test cases in the test suite, select the specific tests in the test suite details pane, and choose Configurations in the Test Suite Details pane toolbar.

    The Select Test Configurations dialog box is displayed.

  4. To view all the test configurations in your team project, choose All configurations.

    Any configurations in your team project that are not assigned to this test plan are displayed.

  5. To create or remove an existing pairing of any test case in this test suite with a specific configuration, choose in the appropriate cell.

    A check mark is displayed or removed from the cell, based on the previous state of the cell.

  6. To view only the test configurations assigned to this test suite, choose Assigned configurations.

  7. (Optional) To reset the test case and configuration pairings, choose Reset defaults.

  8. (Optional) If you have many changes to make, select Enable range selection and fill mode to mark a range. To start marking the range, choose the first item, and then hold down SHIFT and then choose the last item.

    All the items in the range are filled with the same value as the first item.

  9. To save your changes, choose Apply changes.

By default, tests are assigned to be run by the user that is assigned to the test case. Use the following procedure and illustration to assign each pairing of a test with a configuration if you want a tester who is not assigned to the test case to run this particular pairing. This does not change the user who is assigned to the test case.

Assign Who Will Run Tests

To assign tests to testers

  1. From the Testing Center, choose Plan and then choose Contents.

    The Contents page is displayed.

  2. To change the default assignments of testers, select the test suite that contains the test cases that you want to reassign.

  3. If you want to be able to reassign any of the test cases in a test suite, right-click the test suite and select Assign testers for all tests.

    - or -

    If you want to reassign specific test cases in the test suite, select the specific tests in the test suite details pane, and choose Assign in the Test Suite Details pane toolbar.

    The Assign Testers dialog box is displayed. It shows all the pairings of test cases and configurations for the test cases that you selected.

  4. Choose Tester to select a different tester to run the specific pairing of a test case with a configuration.

    Note Note

    You can select multiple pairings of test cases and configurations and change the assignment for all by changing Tester for any one of the selected rows.

  5. (Optional) To group the test cases by a specific column, drag the column title to Drag a column header here to group by that column. If you drag the column title for configuration, you can now select all the test cases for a specific configuration. Press Shift in the first row of the group and press Shift in the last row, and then choose Tester in one of the rows to assign them to the same tester.

  6. To save your changes, choose Save assignments.

    Any changes to the assignments are displayed in Testers.

    Note Note

    If different testers are assigned to different configurations for the same test, Multiple is displayed in Testers.

You might want to list and run your test cases in a specific order. For example, you might want to run the simplest tests first, because if these tests failed then the subsequent tests in your test suite would be blocked. You can change the order of your test cases in your test suite, unless your test suite is a query-based test suite or has been created by adding a requirement or user story to your test plan. When you run the tests from the test suite, the tests will be listed in Test Runner in the order shown in the order column in your test suite.

Change Order of Test Cases in a Test Suite

To order test cases in a test suite

  1. From the Testing Center, choose Plan and then choose Contents.

    The Contents pane is displayed.

  2. To change the order of test cases in a test suite, select the test suite in the test suite hierarchy pane, and then choose Order.

    The Order Test Cases dialog box is displayed. All test cases in the test suite are shown in the list of tests.

  3. Type the new value for the position of a test in Order. For example, to move a test to the top you can type 1 in Order, or to move a test to the end of the list type the total number of test cases in the suite in Order.

    This order will now be used when you run these tests.

    Note Note

    To move a test case A (order 2) under an existing test case B (order 4), type 5 in Order. Test case A will now appear under test case B. To move a test case C (order 5) above an existing test case D (order 3), type 3 in Order. Test case C will now appear above test case D.

You might want to add external links to a Web site that has more information about the application that you are testing. Or you might want to link to a document about the requirements that you need to test for the current sprint from your test plan. This allows you to associate any relevant information with your test plan so it can easily be located by a tester.

Add External Links to Test Plan

To add external links to your test plan

  1. From the Testing Center, choose Plan and then choose Properties.

    The Properties pane is displayed.

  2. To add an external link, choose the down arrow next to Links, and then choose Add.

    The Add External Link dialog box is displayed.

  3. Type the value for the URL in External URL. This could be a file or a Web site.

  4. Type a comment to identify the URL in Comment.

  5. Choose Add link.

    The URL is now displayed in the list of links.

  6. (Optional) To open the link to verify that the path is correct, select the link and choose Open.

    You can add and delete links as required for your test plan.

Show:
© 2014 Microsoft