Multiple NUnit test assemblies, each requiring different config. How to get NUnit to run them all at once

nunit

I have 13 separate but related architecture assemblies, and 13 separate NUnit test assemblies, each one containing all the test fixtures for its matching architecture assembly. I am using NUnit 2.5.2 (latest version currently).

I can run each test assembly separately in the NUnit GUI and all the tests pass. However, when I come to combine them into a single NUnit project file, NUnit insists on applying a single config file to the whole test run. This won't work because each test assembly requires different config. I can't merge them into one "uber-config" file because some of the sections are mutually exclusive. I have tried running each assembly in the project in separate AppDomains, and also separate processes, but in both cases it fails to use the DLL-specific config file, so all the tests crash and burn.

I have done a Google search but so far I have not found any indication that NUnit supports this scenario. Am I right, or have I missed something?

I have tried my hardest to re-architecture the tests so that they could share the same config file, but I've had to admit defeat on that front.

Best Answer

NUnit 2.5 has as setting where you can enable each assembly to run in a separate AppDomain. By doing this, NUnit will load the config for the assembly and not the one for the .nunit project.

For more info, see here:

http://nunit.org/index.php?p=settingsDialog&r=2.5

Related Topic