I want to do some integration tests on my project. Now I am looking for a mechanism that allow me execute some code before all tests begin and execute some code after all tests ends.
Note that I can have set up methods and tear down method for each tests but I need the same functionality for all tests as a whole.
Note that I using Visual Studio, C# and NUnit.
Annotate your test class with the NUnit.Framework.TestFixture attribute, and annotate you all tests setup and all tests teardown methods with NUnit.Framework.TestFixtureSetUp and NUnit.Framework.TestFixtureTearDown.
These attributes function like SetUp and TearDown but only run their methods once per fixture rather than before and after every test.
EDIT in response to comments: In order to have a method run after ALL tests have finished, consider the following (not the cleanest but I'm not sure of a better way to do it):