Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running VSTS tests without mstest.exe

From reasons I won't get into, all our unit tests are using the VSTS test framework. I now want to create an MSBuild script that runs the tests, but I don't want to use mstest.exe from various reasons (it's slower, requires Visual Studio installation everywhere, I need to maintain testrunconfig, etc.)

I've seen that TestDriven.net and TeamCity are able to run VSTS tests 'NUnit style', without using mstest.exe. Are you aware of any standalone command line utility that does this?

like image 457
Doron Yaacoby Avatar asked Oct 14 '09 07:10

Doron Yaacoby


People also ask

Does Visual Studio use MSTest or VSTest?

Visual Studio includes the VSTest and MSTest command-line tools for testing purposes. We can use both VSTEST and MSTEST to run automated unit and coded UI tests from a command line. 1.

Where is MSTest EXE located?

The default path is: C:\Program Files (x86)\Microsoft Visual Studio <version>\Common7\IDE. Currently MSTest distributed with Microsoft Visual Studio/Visual Studio Test Agent 2015 is supported.


1 Answers

You can execute Team System Tests (MSTest) in NUnit if you use a special NUnit Addin that recognizes the MS Test Attributes (TestClass, etc).

Exact Magic Software has an open-source "test-adapter" that can do this.

UPDATE: I've reworked Exact Magic's Msts NUnit Adapter for NUnit 2.5.2.

  • Download here: http://snippetware.googlecode.com/files/ExactMagic.MstsAdapter.zip
  • Read more about it here: http://www.bryancook.net/2009/10/mstest-nunit-adapter.html
like image 112
bryanbcook Avatar answered Oct 11 '22 14:10

bryanbcook