Why is it not running my tests?

So you tell TestDriven.Net (the rocket) or Resharper to run all your tests from Visual Studio but suddenly some of them do not run. What is going on?

Easy: one or more of your tests are throwing StackOverflowException or maybe other fatal error the system is not able to recover from. Infinite recursion causes this.
TestDriven.Net might print this in the output window: "An existing connection was forcibly closed by the remote host"

To find out which one, run all the tests with Resharper and see which one is "aborted". Then add a break point and debug it. The debugger will tell you exactly where is the problem for you to fix it.

Happy testing! 🙂


Enjoyed reading this post?
Subscribe to the RSS feed and have all new posts delivered straight to you.