I have a solution with a few nunit test assemblies and several more in the works.
Right now, I'm running my nunit command in my msbuild file like so:
<Exec Command="nunit-console src\Assembly1.Tests\bin\Debug\Assembly1.Tests.Tests.dll src\Assembly2.Tests\bin\Debug\Assembly2.Tests.Tests.dll src\Assembly3.Tests\bin\Debug\Assembly3.Tests.Tests.dll src\Assembly4.Tests\bin\Debug\Assembly4.Tests.Tests.dll" />
Clearly this is unreadable and sucks. So the question is how do I improve this? Specifically:
- Is there some way I can put the test assemblies in a list and get output equivalent to
foreach(var assembly in testAssemblies) string.Format("src\\{0}\\bin\\debug\\{1}", assembly)
- Should I be running all of my tests in a single nunit-console command? I'm guessing yes because I want it all in a single output file, and a single command which returns 0 or non-zero (thus failing the build if non-zero).