Share via


How to: Create a Manual Test Case

You can create manual test cases with Visual Studio 2010 Ultimate or Visual Studio Test Professional that have both action and validation test steps. You can also share a set of common test steps between multiple test cases called shared steps. This simplifies maintenance of test steps if your application under test changes. For more information about shared steps, see How to: Share Common Test Case Steps Using Shared Steps.

Any test case that you create is associated with your team project and can be added to multiple test suites in the same or different test plans. When you run these test cases, you can mark which test steps pass and which steps fail. You can create a bug from a test case that fails. This bug automatically includes the test steps and other information that is collected. For more information about how to run a manual test case, see Running Manual Tests Using Test Runner.

If you want to run a manual test case multiple times with different data, you do not have to create multiple copies of the test case. You can add parameters to the actions or expected results for any test step in your test case. Then you can add multiple sets of values for the parameters that you want to use in your test. Each set of values for the parameters is run as an individual iteration of the test. For more information about this, see How to: Add Parameters to a Manual Test Case To Run Multiple Times with Different Data.

You can create a manual test case from within a test plan by selecting a suite as shown in the following illustration.

Add Test Cases to a Test Suite

Note

If you created the test suite by adding a requirement to the test plan, any existing test cases or new test cases that you add to the test suite will automatically be linked to the requirement.

You can then add the details for your test case as shown in the following illustration.

Create a Manual Test Case

Note

You can add test steps by copying and pasting from Microsoft Excel and Microsoft Word. Select the steps from your Microsoft Excel or Microsoft Word document, right- click an existing step or Click here to add a step, and then point to Paste. For more information, see How to: Add Test Steps to a Manual Test Case from a Microsoft Excel or Microsoft Word Document. You can also copy and paste from a plain text file that has a tab-delimited list of actions and expected results.

Use the following procedures to create and modify manual test cases:

  • Create a manual test case

  • Add action and validation test steps to your manual test case

Create a manual test case

To create a manual test case

  1. Open Microsoft Test Manager.

    Note

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

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. Select the test suite in the test suite hierarchy pane that you want to add test cases to, and then click New.

    The New Test Case dialog box is displayed.

  4. To name the test case, type the name in Title.

    You use this title to identify the test case and search for it if you have to.

  5. Click Assigned To to select the appropriate owner for the test case.

  6. (Optional) To change the state of a test case, you must first save the test case. After you save the test case, you can select a state from a list, based on the following table:

    State

    When to use it

    Design

    The test case is being designed and has not yet been reviewed and approved.

    Ready

    The test case has been reviewed and approved and is ready to be run.

    Closed

    The test case is no longer required for future iterations of this team project.

    These states are based on the process template that was used to create your team project. For more information about how to customize process templates, see Customizing Process Templates.

    Note

    By default, State is set to Design. A test case that is in the Design state can still be run.

  7. Click Priority to select the importance of the test case.

  8. (Optional) A manual test case can be converted into an automated test. To set the status of a test case for automation, click Automation Status and select a state from a list, based on the following table:

    State

    When to use it

    Not Automated

    This is a manual test case only.

    Planned

    The plan is to add automation for this test case in the future.

    Automated

    This value is automatically set if an automated test is added to this test case.

    Note

    By default, Automation Status is set to Not Automated. For more information about how to convert a manual test case into an automated test case, see How to: Associate an Automated Test with a Test Case.

  9. Click Area to select the appropriate area in the team project for the test case.

    Note

    The areas are set up by your Team Foundation Server administrator for the team project. You can use the area field to query for manual test cases.

  10. Click Iteration to select the iteration in your team project for this test case.

  11. (Optional) To link the test case to requirements or user stories that this test case tests, click Tested User Stories and then click Link to. Next, type the items in Work item IDs, or browse for the items and click OK.

    The requirements or user stories are displayed.

  12. To save the test case, click Save in the toolbar.

    Note

    After the test case has been saved, the test case identifier is shown in the title of the editing pane.

Add action and validation test steps to your manual test case

For each test step in your manual test case, you can list the action and the expected result. You can also attach a file that provides more details, or a screen shot to provide more information to the tester.

To add action and validation test steps to your manual test case

  1. Open Microsoft Test Manager.

    Note

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

  2. From the Testing Center, click Plan and then click Contents.

    The Contents pane is displayed.

  3. Select the test suite in the test suite hierarchy pane that contains your test case.

  4. To open the test case to add steps to it, double-click the test case listed in the test suite details pane.

  5. Click Steps.

  6. Click <Click here to add a step>, and then type the details of the test step.

  7. Under Action, type the action that the tester takes to perform this test step.

  8. (Optional) Under Expected Result, type the result the user should expect after the action has been performed.

    Note

    If you add expected results to a test step, it automatically becomes a validation test step shown by the red check mark on the step icon. By default, each test step is an action test step and does not require validation when you run this step. When you run the test case, you must individually mark a validation test step as either passed or failed. If you do not, the test will automatically be assigned a status of fail.

  9. To add another test step, click Enter. You can add as many test steps as you require for your test.

  10. (Optional) To add a file as an attachment to a test step, click the test step and then click attachment icon on the toolbar. To enter the location of the attachment, click Add, type the location of the file and then click OK.

  11. (Optional) To insert a test step, select a step and click Insert step on the toolbar.

    A test step is inserted above the selected step.

  12. (Optional) To move test steps in the list, select one or many steps and then click Move up or Move down on the toolbar.

    The selected steps will move up or down one step.

  13. (Optional) To add shared steps to the test case, right-click a step and point to Insert shared steps. Select the shared steps from the list and then click Insert.

    The shared steps are inserted above the selected step.

    Note

    You can also create shared steps from a test case. For more information, see How to: Share Common Test Case Steps Using Shared Steps.

  14. To save the test case, click Save and Close on the toolbar.

    The test case can now be run using the Test Runner. For more information, see How to: Run Manual Tests.

See Also

Tasks

How to: Share Common Test Case Steps Using Shared Steps

How to: Run Manual Tests

How to: Run Multiple Manual Tests in a Test Suite

How to: Add Parameters to a Manual Test Case To Run Multiple Times with Different Data

How to: Create a Work Item using Microsoft Test Manager

How to: Search for a Specific Work Item using Microsoft Test Manager

Concepts

Creating Manual Test Cases