How do I use MSTest without Visual Studio?

Visual Studio-2010Visual StudioUnit TestingMstest

Visual Studio-2010 Problem Overview


Does MSTest have standalone GUI similar to nUnit that lets me use it and run test without visual studio? What is the official site for MSTest where I can learn more about how to use it?

Visual Studio-2010 Solutions


Solution 1 - Visual Studio-2010

MSTest can be used without installing Visual Studio. You will need to install Visual Studio Test Agent, which is a free download from Microsoft.

I think this approach is better from a licensing perspective than manually copying MSTest.exe and its dependencies onto the build server.

See this blog for reference: http://blogs.msdn.com/b/anutthara/archive/2009/12/16/running-tests-in-mstest-without-installing-the-vs-ide.aspx

Solution 2 - Visual Studio-2010

It doesn't have a GUI (apart from Visual Studio) but there's a command line tool: MSTest.exe

Here is the official documentation on running MSTest tests.

Solution 3 - Visual Studio-2010

You can do this with mstest.exe, but the trick is in getting it to work without installing visual studio. This involves the copying of several files and registry entries. I have blogged about it here.

Solution 4 - Visual Studio-2010

Use Gallio as your test runner... then its not so much of a drama when you enventually drop MsTest and move to a real test framework.

Solution 5 - Visual Studio-2010

Use VSTest.console.exe part of Microsoft.TestPlatform

Required steps:

  1. Download the test platform from https://www.nuget.org/packages/Microsoft.TestPlatform/
  2. Unzip
  3. In the unzipped folder, copy the \tools\net451\Common7\IDE\Extensions\TestPlatform folder to the machine that has no Visual Studio installed
  4. From cmd.exe run VSTest.console.exe MyTest.dll

More details here:https://docs.microsoft.com/en-us/visualstudio/test/vstest-console-options?view=vs-2017#general-command-line-options

Solution 6 - Visual Studio-2010

You can also use this tool from codeplex: http://testrunner.codeplex.com...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbitbonkView Question on Stackoverflow
Solution 1 - Visual Studio-2010borisView Answer on Stackoverflow
Solution 2 - Visual Studio-2010Alexander KojevnikovView Answer on Stackoverflow
Solution 3 - Visual Studio-2010Wim CoenenView Answer on Stackoverflow
Solution 4 - Visual Studio-2010RhysCView Answer on Stackoverflow
Solution 5 - Visual Studio-2010SirafView Answer on Stackoverflow
Solution 6 - Visual Studio-2010Peter SchmitzView Answer on Stackoverflow