Compartir a través de


Running automated tests from the command line

Visual Studio 2012 includes the following command-line tools for testing purposes:

  • VSTest.Console.exe You can use the VSTest.Console.exe program to run automated unit and coded UI tests from a command line. VSTest.Console.exe is optimized for performance and is used in place of MSTest.exe in Visual Studio 2012.

  • MSTest.exe You can use the MSTest.exe program to run automated tests in a test assembly from a command line. MSTest is used for load tests and for compatibility with Visual Studio 2010 test projects. MSTest can also be used to view the test results from these test runs, save the results to disk, and save your results to Team Foundation Server.

  • TCM.exe Tcm.exe is a command-line utility that lets you perform the following tasks:

    1. Import automated tests into a test plan

    2. Run tests that are part of a test plan from the command line

    3. View a list of test items and their corresponding IDs to use when you import tests or run tests

    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 VSTest.Console.exe: You can run automated unit and coded UI tests from the command line.

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

Using MSTest.exe, you can save and view the automated test results from your test runs from the command line to your Team Foundation Server.

MStest can also be used to run tests created in a Visual Studio 2010 test project, or if you have manually added a .testsettings file to your Visual Studio 2012 test project type.

See Also

Other Resources

Running System Tests Using Microsoft Visual Studio

Creating System Tests Using Visual Studio

Plan Manual Tests using Team Web Access