Using MSTest from the command line

You can use the MSTest.exe program to run automated tests in a test assembly from a command line. You can also view the test results from these test runs, save the results to disk, and save your results to Team Foundation Server.

Warning

MSTest is used to run load test in Visual Studio 2012. By default, unit tests and coded UI tests use VSTest.Console.exe in Visual Studio 2012. However, MSTest is used for compatibility with test projects created using Visual Studio 2010, or if a .testsettings file is manually added to a Visual Studio 2012 solution containing a unit test project, or coded UI test project.

You can also use tcm.exe to run test cases with associated automation from the command line using a test environment.

Tasks

Use the following topics to help you run automated tests from the command line:

Tasks

Associated Topics

Running automated tests from the command line using mstest.exe: You can run automated tests from the command line either locally or by using a test controller or test agents.

Running test cases with associated automation from the command line using tcm.exe: You can run automated tests from the command line either locally or by using a test controller or test agents.

Saving automated test results: You can save the automated test results from your test runs from the command line to your Team Foundation Server.

Viewing results for your automated test runs: You can view the results for your test run.

See Also

Other Resources

Running System Tests Using Microsoft Visual Studio

Creating System Tests Using Visual Studio

Plan Manual Tests using Team Web Access