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.
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.
Use the following topics to help you run automated tests from the command line:
|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.||- Run automated tests from the command line using MSTest|
- MSTest.exe command-line options
- Walkthrough: using the command-line test utility
|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.||- Run automated tests from the command line using tcm|
- Tracking software quality
|Saving automated test results: You can save the automated test results from your test runs from the command line to your Team Foundation Server.||- Command-Line test results|
- Command-Line options for publishing test results
|Viewing results for your automated test runs: You can view the results for your test run.||- How to: Save and Open Web Performance and Load Test Results in Visual Studio|