locked
Reload application domain inbetween unit tests RRS feed

  • Question

  • Is there a way to reload the host in between unit tests?  My team has a large set of automated unit tests, and some objects happen to continue running in the background causing logs.   So, I want a way to be able to ensure every time a test is run, the application domain is fresh and there are no extrenous objects left around.

    The easiest way I can think of doing this is to have the app domain the test is running in be reloaded between every test.  Is there a way to do this in the MSTest configuration or to do it in code for the unit test?


    Thursday, August 25, 2011 4:33 PM

Answers

  • In case someone is looking for this thread, as far as I can tell, there is no way to do this in the current version of visual studio.

    That's unfortunate since test runners such as NUnit do support this.

    Thursday, April 19, 2012 5:14 PM