The easiest way to do this is to merge the many NUnit files your suite generates into a single one. This answer links to a library created to do the merge as an MSBuild task.
The first step is to compile that library (no issues for me when I tried) and put the built assembly in a directory with the following MSBuild project (or something similar):
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="UnitTest">
<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\15below.NUnitMerger.dll"
TaskName="FifteenBelow.NUnitMerger.MSBuild.NUnitMergeTask" />
<Target Name="UnitTest">
<ItemGroup>
<ResultsFiles Include="$(MSBuildProjectDirectory)\nunit-result*.xml" />
</ItemGroup>
<NUnitMergeTask FilesToBeMerged="@(ResultsFiles)"
OutputPath="$(MSBuildProjectDirectory)\TestResult.xml" />
</Target>
</Project>
Here, I'm assuming your files are set up in the same directory, i.e.:
Once your NUnit results are in the directory, run MSBuild from this directory to get your output:
msbuild merge.msbuildproj
The resulting file (here it's TestResult.xml
) has the same format as the normal Xml output from NUnit, but has all the test-suite type=Assembly
nodes from the input files.