Question

I am surprised that I have not been able to find this information online. We use Sonar to run Gallio to collect test coverage information. When Gallio runs it reports the following error.

Cannot run tests because the MSTest executable was not found

Now we use Visual Studio 2012. The test runner is no longer mstest, but is instead vstest.console.exe. Can Gallio use the Visual Studio 2012 test runner, and if so, then how do I set that up?

Was it helpful?

Solution

Gallio only uses MSTest.exe to run tests so you need to at least have the VS2010 test agents installed execute tests: https://code.google.com/p/mb-unit/issues/detail?id=899

Gallio does not have the ability to use the Visual Studio test runner at this time which means you cannot use things like Fakes in your unit tests which MSTest.exe does not know how to instrument. Although many VS2012/2013 tests will run successfully with MSTest.exe, new features will fail unless run with vstest.console.exe which needs to be implemented as an extension in Gallio to work correctly: https://code.google.com/p/mb-unit/issues/detail?id=923

If you just need Gallio to run your unit tests written in VS2012, install the test agents to make MSTest.exe available to Gallio to run the tests. If you want Gallio to use vstest.console.exe and make use of new test features that MSTest.exe are not capable of running, you will need to wait for this extension to be added to Gallio (or contribute it yourself).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top