We have a testing environment using Visual Studio 2013 and MSTest where we need to run a setup script (.cmd-file) before starting certain test runs. Currently we are using .testsettings
files for this purpose, which works great.
However a problem arose when we started using MS Fakes and shims, because debugging tests using the ShimsContext
throws a UnitTestIsolationException
with the error message Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.
The way to resolve this appears to be to change to a .runsettings
file instead, to use the Visual Studio testrunner instead of MSTest. But how can we specify a setup script to be run once before the entire test run using this file format?