Export (0) Print
Expand All

How to: Create a Manual Test Case

You can create manual test cases using Microsoft Test Manager 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.

Requirements

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

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 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 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- choose an existing step or Choose 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:

To create a manual test case

  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. From the Testing Center, choose Plan and then choose 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 choose 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. Choose 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 Customize Process Templates.

    Note Note

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

  7. Choose 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, choose 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 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. Choose Area to select the appropriate area in the team project for the test case.

    Note 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. Choose 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, choose Tested User Stories and then choose Link to. Next, type the items in Work item IDs, or browse for the items and choose OK.

    The requirements or user stories are displayed.

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

    Note Note

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

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 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. From the Testing Center, choose Plan and then choose 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. Choose Steps.

  6. Choose <Choose 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 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.

    Note Note

    Microsoft Test Manager includes a toolbar that you can use to format the text of your steps. You can use various formatting options such as bold, underline, or color highlighting to emphasis key points in your comments.

  9. (Optional) Press and hold the Alt key and then press Enter to add a subordinate test step and expected results. You can add as many multiple subordinate test steps as you require for the test step.

    For example, as shown in the previous illustration, you can create a test step called “Login to application” and then add the following subordinate test steps:

    • “Choose the Sign In link in the upper-right corner.”

    • “In the user field, type your username.”

    • “In the password field, type your password.”

    • “Choose the Sign In button.”

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

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

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

    A test step is inserted above the selected step.

  13. (Optional) To move test steps in the list, select one or several steps and then choose Move up or Move down on the toolbar.

    The selected steps will move up or down one step.

  14. (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 choose Insert.

    The shared steps are inserted above the selected step.

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

  15. To save the test case, choose 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.

Show:
© 2014 Microsoft