We are using nant to build our source code and run unit tests (nunit 2.5). In nant build file, we have separate nunit2 targets for different unit test assemblies.
<each message="Run Test 1" />
<nunit2 verbose="true">
<formatter type="Plain" />
<test assemblyname="Test1.dll" />
</nunit2>
<each message="Run Test 2" />
<nunit2 verbose="true">
<formatter type="Plain" />
<test assemblyname="Test2.dll" />
</nunit2>
On Team City build server it causes performance issue - each such target forces to load Nunit runner separately.
There is a possibility to merge tests in one nunit2 target:
<nunit2 verbose="true">
<formatter type="Plain" />
<test assemblyname="Test1.dll" />
<test assemblyname="Test2.dll" />
</nunit2>
However, output in such case is not explicit enough for us without echo statements.
Is there a way to have one nunit2 target and specify custom messages for each test? Something like the following:
<nunit2 verbose="true">
<formatter type="Plain" />
<each message="Run Test 1" />
<test assemblyname="Test1.dll" />
<each message="Run Test 2" />
<test assemblyname="Test2.dll" />
</nunit2>
The only way I found to have unit tests more verbose is to add labels attribute on nunit2 target
As a result, nant will output all run unit tests in the following format