Running Tests in Microsoft Test Manager

Using Microsoft Test Manager you can run manual tests, exploratory test sessions, and automated tests from a test plan. When you run any of these tests from your test plan, you can save your test results into the team project for your Team Foundation Server. You can view the progress of your automated tests, exploratory test sessions, and manual tests from your test plan.

You can run automated tests from Visual Studio or from the command line. You can also run tests by using Team Foundation Build. Test results are created every time that you run a group of tests.

Requirements

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

To run manual tests and exploratory test sessions, you must use Microsoft Test Manager to run your tests from a test plan. The following illustration shows how to run a manual test. After running your manual tests or exploratory test sessions, you can view your test results from your test plan.

Run Manual Tests

After you have created any of the following types of automated tests by using Visual Studio, you can use Microsoft Test Manager or Visual Studio to run the tests:

  • Unit tests.

  • Coded UI tests.

  • Load tests.

For example, if you want to run your automated tests and see the results immediately, you can just run your tests from Visual Studio and view the test results, as shown in the following illustration.

Note Note

Load tests are run from the LOAD TEST menu in Visual Studio, not from the Test Runner.

Unit Test Explorer running automated tests
Note Note

These test results will not be part of a test plan, even if you publish these test results to Team Foundation Server.

If you want to run your automated tests and have the results added to a test plan, you can associate your automated tests with test cases using Visual Studio, and then run them using Microsoft Test Manager, as shown in the following illustration.

Run Automated Tests Using Microsoft Test Manager

Use the following topics to help you run your tests.

Tasks

Associated topics

Setting up how to run your tests: By using test settings, you can define where to run your tests, what data to collect, or how to affect the test machine when you run your tests. If you have a multitier application, you can select a set of roles for this. You can then use a lab environment that contains these roles to run your tests from your test plan. Or you can use a test controller and test agents when you run your tests by using Visual Studio.

Running manual tests from a test plan: You can run manual tests from your test plan by using Test Runner to record if each step passes or fails. The test outcome and any data that is collected when you run the test can be saved. You can also submit bugs with comments, screenshots, and file attachments that you add when you run your manual tests.

Speeding up manual testing: You can record the UI actions that you take when you run a manual test. When you run the test again, you can play back the action recording that you created to fast-forward to a specific location in your test by automatically performing these actions.

Running exploratory tests: Using Test Runner, you can run an exploratory test session. Exploratory testing is the testing of an application without a set of tests defined in advance. During an exploratory test session, you are not restricted to a script or a set of predetermined steps as you are with a manual test. You can run an exploratory test that is either associated with a product backlog work item type, or a non-specific exploratory test session.

As with Test Runner, you can submit bugs with comments, screenshots, file attachments, and video or voice recordings that you add when you run your exploratory tests.

Running automated tests: You can run tests directly from Visual Studio, from Microsoft Test Manager, from Team Foundation Build, or from the command line. You can use mstest.exe to run your automated tests from the command line, or you can use tcm.exe to import your test methods into test cases. You can then run the test cases for specific configurations from the command line and save the results for the appropriate test plan.

You can also submit bugs for any issues that you find.

Finding tests that have to be run: You can find recommended tests to run based on code changes to the application under test. You can also check which builds have specific bugs that have been fixed or new features or requirements, and then determine which tests to run.

Analyzing test results: You can analyze the test results for each test run of your automated tests. You can also review the code coverage results to verify that your tests are testing as much of your application as possible.

Customizing how your tests are run: You can create your own diagnostic data adapters to collect specific data or affect the test machine when you run your tests.

Running Tests in Lab Environments: Using Visual Studio Lab Management, you can run manual or automated tests from a test plan on a collection of virtual and physical machines.

  1. Running Tests in Lab Environments

Running Load and Web Performance Tests

You can also run test to isolate stress and load issues by using load and Web performance tests.

Setting Up Automated Build-Deploy-Test Workflows

If you want to build your application, deploy the application, and run tests as part of a build definition, you create a build-deploy-test workflow.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft