I have a unit test assembly using NUnit that contains thousands of tests in different namespaces and fixtures.
I want to run some global configuration before running any tests in my build (setting up Trace listeners). I can do this by creating [SetUpFixture] in the global namespace.
This works well for all tests, for example:
nunit.exe testassembly.exe
However, if I specify a device for testing, then the global configuration will not start, for example:
nunit.exe testassembly.exe /fixture=MyTests
How to provide a global setting that always starts before running any tests in the assembly?
UPDATE:
Please note that the console test runner will work fine using the /run option, i.e. global configuration is launched even when only a specific test device is launched. I get a solution for a GUI tester.
source share