How to stop MsTest tests execution after *n* failed tests
I want to run unit tests via MS Test (from windows console) in a way that I can stop/kill the test execution whenever the failed tests count exceeds certain threshold value. For my use case there is no point to keep running tests when certain percentage of the tests already failed. I can only think in creating a new console app to wrap the mstest.exe execution, so I can parse the standard output in real-time, and eventually kill the process, for example: var pi = new ProcessStartInfo() { FileName = MS_TEST, UseShellExecute = false, RedirectStandardOutput = true, Arguments = MS_TEST_ARGS }; int