Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use MSTest without Visual Studio?

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?

like image 803
bitbonk Avatar asked Nov 04 '08 09:11

bitbonk


People also ask

How do I run MSTest?

To access the MSTest tool, add the Visual Studio install directory to the path or open the Visual Studio Group from the Start menu, and then open the Tools section to access the Visual Studio command prompt. Use the command MSTest from the command prompt.

How do you add MSTest to a project?

On the Create a new project page, type unit test into the search box. Select the project template for the test framework that you want to use, for example MSTest Test Project or NUnit Test Project, and then select Next. On the Configure your new project page, enter a name for your project, and then select Create.


2 Answers

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

like image 183
boris Avatar answered Sep 19 '22 19:09

boris


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.

like image 28
Alexander Kojevnikov Avatar answered Sep 22 '22 19:09

Alexander Kojevnikov