Hi Carel
Thanks for your reply, and sample code. I came to a similar conclusion
as a workaround yesterday, to use batching in MSBuild. Our test target
msbuild script is below. The NCover task will get called once for each
item in the TestAssembliesFromFile item group and then I can pass a
unique report name to each run of NCover. The drawback is that this
adds an overhead to our build time with each separate call to NCover/
MbUnit and lengthens our test runs to 16 minutes, vs 12 minutes with a
non-batching version where some reports are overwritten.
I would maintain that, given MbUnit's ability to run tests on a list
of assemblies passed in, MbUnit should be able to either merge the
results into a single report or generate a unique name for each
report. I don't think it is safe to assume that a one minute
resolution on the file name will be sufficient to avoid overwriting
report files, but I will make this feature request in the Mbunit
developers group.
Thanks again
Andrew
<Target Name="RunTests"
DependsOnTargets="CleanReportFiles;CreateTestList;MapDrives">
<ReadLinesFromFile File="C:\TestList.txt" Condition="Exists('C:
\TestList.txt')" ContinueOnError="false">
<Output TaskParameter="Lines" ItemName="TestAssembliesFromFile"/
>
</ReadLinesFromFile>
<MakeDir Condition="!Exists('$(RootSourceFolder)\Build\ci
\codeCoverage')" Directories="$(RootSourceFolder)\Build\ci
\codeCoverage"/>
<NCover ToolPath="$(RootSourceFolder)\Dev\bin\redist\NCover\"
CommandLineExe=""$(RootSourceFolder)\Dev\bin\redist\MbUnit
\MbUnit.Cons.exe""
CommandLineArgs="$(MbUnitArgs) /rnf:%
(TestAssembliesFromFile.filename) %(TestAssembliesFromFile.Identity)"
CoverageFile="codeCoverage\%
(TestAssembliesFromFile.filename)Coverage.xml"
LogLevel="Verbose"
LogFile="Coverage.log"
WorkingDirectory="$(MSBuildProjectDirectory)"
ExcludeAttributes="CoverageExcludeAttribute;MbUnit.Framework.FixtureCategoryAttribute"
ContinueOnError="true" />
<CreateItem Include="$(RootSourceFolder)\Build\ci\codeCoverage
\*Coverage.xml">
<Output TaskParameter="Include" ItemName="CoverageFiles" />
</CreateItem>
<NCoverExplorer ToolPath="$(RootSourceFolder)\Dev\bin\redist
\NCoverExplorer\"
ProjectName="Photocenter 3.0"
OutputDir="$(RootSourceFolder)\Build\ci\codeCoverage"
CoverageFiles="@(CoverageFiles)"
SatisfactoryCoverage="40"
FailMinimum="false"
Exclusions="$(CoverageExclusions)"
ShowExcluded="true"
ReportType="3"
XmlReportName="SummaryCoverage.xml"
ContinueOnError="true" />
<CallTarget Targets="UnMapDrives"/>
</Target>
Target>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---