The Right Way to do Test Cleanup

September 2, 2014

MSTest and NUnit, as most of the other common test frameworks, provide means for write cleanup code that is executed whether the test passed or failed. In addition they provide means to write cleanup code that runs after all tests in a class or assembly has completed. This is especially important in End-to-end or Integration Tests, in which the tests cannot be 100% isolated from one another. In MSTest this is done using the , and attributes. Of course there are also corresponding attributes, but this is out of the scope of our discussion. Look here for...