Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Visual Studio 2013 plus TFS and MTM. Want to run tests from the command line. There are three programs available. How do I choose which of tcm.exe, mstest.exe and vstest.console.exe I should use?

Microsoft provides many pages about each of the three programs, telling what they do and how to use them. My researches had not found any pages that compared the programs and explained how one should choose between them. The page listed in Kate Paulk's answer gives a start on comparing the programs.

share|improve this question
Hi, AdrianHHH - what has your research found that doesn't answer your question? Some things you might want to add here - what kind of tests do you want to run? What do you want to do with them? – Kate Paulk Jan 17 '14 at 16:57

To start with, according to the MSDN documentation I found with a quick search, each tool is optimized for a specific kind of test automation.

  • tcm.exe - Team Foundation Server/MTM test cases associated with automation - this runs the test cases, rather than directly running the tests and automatically updates the test case status (I think - I'm not that familiar with it). It appears to be functionally a command line wrapper around MTM's ability to run automation.
  • vstest.console.exe - Microsoft unit tests and Microsoft CodedUI tests.
  • mstest.exe - this is the "legacy" tool which will run anything Visual Studio recognizes as a test. It's the tool you need to use with load and performance tests created in Visual Studio and can be used to send test results to Team Foundation Server.

Without knowing what kind of tests you want to run and what you want to do with them, it's not possible to give a more detailed answer.

share|improve this answer
Your search skills are better than mine! – AdrianHHH Jan 17 '14 at 22:40
You can publish results to TFS with vstest.console.exe too with the /logger:TfsPublisher; option. See One thing I noticed: The .trx file from vstest is less complete than the .trx file from mstest. For example the <description> element and <Properties> element collection is missing. A drawback: I have test publishing tooling (Pickles) that rely on those elements. – AutomatedChaos Nov 17 '14 at 9:26

Here is a link for you: How to: Run Automated Tests from the Command Line Using MSTest

I haven't read it, just a quick Google search. But, I would start here if I were in your shoes. I hope, it helps you. On the other hand, MSDN documentations are helpful.

share|improve this answer
The question is about selection from 3 tools, your link is about only 1 – Michael Freidgeim Apr 7 at 6:33

There are a few pages that describe the differences between newer VSTest.Console.Exe and older MSTest.exe.

Choose and configure a test runner
VStest support recent features, including Fakes. However some features(such as database unit tests, load and web tests) supported only in old MSTest.

vstest.console.exe – CommandLine Test Runner
Gives a brief summary on the various switches provided by Mstest.exe and the equivalent switches in vstest.console.exe.

Replace MSTest to VSTest to support Fakes
Describe parameters that should be changed if you move from MSTest to VSTest.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.