Can I have code that executes before and after tests are run by NUnit?
Posted
by Billy ONeal
on Stack Overflow
See other posts from Stack Overflow
or by Billy ONeal
Published on 2010-06-07T20:50:14Z
Indexed on
2010/06/07
21:12 UTC
Read the original article
Hit count: 229
I've got a bunch of tests in NUnit which create garbage data on the filesystem (bad, I know, but I have little control over this). Currently we have a cleanup tool that removes these temporaries and such, but I'd like to be able to run that cleanup tool automatically. I'd have to be able to run it after all tests have finished running. I have similar checking that I'd like to do at the beginning, to ensure that there are none of these temporaries left from previous runs that might change the outcome of the tests.
Is such a thing simple or am I going to have to implement a whole new test runner for such a thing?
© Stack Overflow or respective owner