Share via


How to: Add Test Steps to a Manual Test Case from a Microsoft Excel or Microsoft Word Document

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 add in these test steps from a Microsoft Excel or Microsoft Word document. For example, if you already have test steps in one of these types of documents, you can import the steps into a manual test case using Microsoft Test Manager.

Important

You can also use a power tool to help you convert any of your existing test cases from Microsoft Excel. To access the power tool use the following Microsoft Web site.

You can also share a set of common test steps between multiple test cases using shared steps. This simplifies maintenance of test steps if your application under test changes.

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 was collected.

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

To add test steps by copying and pasting from Microsoft Excel, Microsoft Word, or a text document, select the steps from your document. The formats for the documents that make it easy to copy the steps are shown in the following illustration. 

Add Test Steps From Microsoft Excel or Word

Note

If you copy both actions and expected results from Microsoft Word or a text document, then the lists of each pairing of an action with an expected result must be tab-delimited.

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

  • Create a manual test case

  • Add action and validation test steps from Microsoft Excel or Word

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 other work items that this test case tests, click Tested Work Items, and then click Add. Next, type the items in Work item IDs, or browse for the items and click OK.

    The work items are listed in Tests.

  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 from Microsoft Excel or Word

You can copy and paste actions and expected results from Microsoft Excel, Microsoft Word, or a text document. If you copy both actions and expected results from Microsoft Word or a text document, then the lists of each pairing of an action with an expected result must be tab-delimited.

You can also attach a file that provides more details, or a screen shot, to provide more information to the tester. You can edit your test steps after pasting the steps into the test case.

To add action and validation test steps from Microsoft Excel or Word

  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.

  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 that is listed in the Test Suite Details pane.

  5. Click Steps.

  6. To copy the text from your document, select the text from your spreadsheet, and choose either a table or a set of lines of text. Right-click your selection and then point to Copy.

    Note

    If you have steps as a numbered list in your Microsoft Word document, you have to remove the numbers before you copy and paste. Otherwise, the numbers are pasted into Action and the text is pasted into Expected Result. If you are only copying one column from a table or spreadsheet, then the data is pasted into Action.

  7. Right-click <Click here to add a step>, and then point to Paste.

    The text that you copied from your document is pasted into the test steps.

    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.

  8. To add another test step, click <Click here to add a step>. You can add as many test steps as you require for your test.

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

  10. (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.

  11. (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.

  12. (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 within a test case. For more information, see How to: Share Common Test Case Steps Using Shared Steps.

  13. 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

Concepts

Creating Manual Test Cases