Share via


How to: Use Recorded Actions in Bugs to Create Test Cases

If you are doing exploratory testing, you might want to be able to create test cases from any bugs that you find to create a regression test suite. You can record actions as text in a log file when you run manual tests using Microsoft Test Manager. This action log is saved with your test result. You can also automatically add this action log to any bug that you create when you run your manual test. You can then use this action log to create a manual test case from a bug or a test result. This makes it easier to create test cases from steps that you have already performed without having to type all the steps. You can then update this test case as necessary.

To create a test case from the action log saved with your test results and not in a bug, see How to: Use Recorded Actions to Create Test Cases.

For example, if you ran a test and after the first two steps, you found an issue by digressing from the steps in the test. You can log a bug and it will record these new UI actions that you took when you digressed from the steps in the test. You can then create a new test case that you can use to retest the bug when it is fixed, as shown in the following illustration. Or, if you are doing exploratory testing using a test case and you submit an exploratory bug, you can create a test case from the actions that you saved with that bug. For more information about submitting an exploratory bug, see How to: Submit an Exploratory Bug using Test Runner.

Create a Test Case From a Bug

Note

You can also create a test case from the recorded actions in a bug when you have a query listing bugs in the Queries activity. For more information about this, see How to: Track Your Bugs.

To create an action log when you run your test, you must use a test settings with the action log selected. For more information about this, see How to: Record User Interface Actions for Manual Tests Using Test Settings.

To use recorded actions in bugs to create test cases

  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. Click the down-arrow on the center group selector and then click Testing Center.

  3. On the center group menu bar, click Test.

  4. To view the bugs currently assigned to you, click Verify Bugs.

    The Verify Bugs view is displayed. It lists all the bugs that are currently assigned to you.

  5. (Optional) To view the bugs created by you, click Created by me.

  6. Select the bug from the list that has the recorded actions you want to use for a new test case.

    Note

    If the bug that you want to use to create a test case is not your bug, you can find the bug using a custom query. To create a custom query from the My Bugs activity, click Edit. For more information about how to create a query, see How to: Track Your Bugs.

  7. To create the test case from the steps of the action log, click Create test case from bug.

    The New Test Case activity is displayed. It shows the test steps from the action log now added to your test case.

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

  9. (Optional) To link the test case to other work items that this test case tests, click All Links and then click Add. Next, type the items in Work item IDs, or browse for the items and then click OK.

    The work items are listed in Tests.

    Note

    The bug is automatically added as an associated work item in Other Links.

  10. To display the steps that were added, click Steps.

  11. To remove any test steps that you do not require in the test case, select the step and then click the delete icon. For example, you may want to remove the steps that show a step was completed or that the parent window was changed.

  12. (Optional) To add expected results to the steps, click Expected Result and type the name of your text.

  13. To add any additional steps, click <Click here to add a step>, and then type the details of the test step.

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

  15. (Optional) Under Expected Result, type the result that 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.

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

  17. To insert a test step, right-click a step and select Insert step.

    Note

    The step will be inserted above the step that you have selected.

  18. To save the test case, click Save and Close.

    Note

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

See Also

Tasks

How to: Create a Manual Test Case

Concepts

Submitting Bugs