Merging Coverage files in 2.0.4
Merging Coverage files in 2.0.4
Just downloaded a trial edition of NCover 2.0.4 In our full test pass, we have 43 different test assemblies. We are running these through NUnit, one at a time. The idea was to have NCover do a report on each assembly, and then merge them at the end.
When attempting to merge, ncoverexplorer.console throws an exception, stating that an Index with the same key already exists.
Full output from commandline window:
C:\dips\V8-TEST\Bin\Debug\Test>ncoverexplorer.console /h:TestSummary\CoverageSum
mary.html /r:FullCoverageReport TestResults\Coverage.*.xml /P:DINA-V8
NCoverExplorer.Console 2.0.4.0
(c) 2007 Gnoso Inc.
http://www.ncover.com/
-- Options: Project Name: DINA-V8 Acceptance%: 95% Sort: Name Filter: None Report Type: FullCoverageReport Html Report: TestSummary\index.html
-- Loading file: C:\dips\V8-TEST\Bin\Debug\Test\TestResults\Coverage.TestDIPS.Ab ortionForm.FragmentData.dll.xml... -- Loading file: C:\dips\V8-TEST\Bin\Debug\Test\TestResults\Coverage.TestDIPS.Ab ortionForm.Integration.dll.xml...
-- Top-level exception A index with the same key already exists. -- Stack Trace at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value) at NCoverExplorer.Core.Parser.CoverageFileParser.AssignSourceFileDocuments( CoverageModel coverageModel, SourceFileList docs) at NCoverExplorer.Core.Parser.CoverageFileParser.LoadAndParseCoverageFile(C overageModel coverageModel, String fileName) at NCoverExplorer.Core.Parser.CoverageFileParser.MergeFile(CoverageModel cov erageModel, String fileName) at NCoverExplorer.Console.ConsoleController.MergeCoverageXmlFiles(CoverageM odel coverageModel, String[] fileNames, Int32 startIndex) at NCoverExplorer.Console.ConsoleController.LoadCoverageFiles(String[] file Names) at NCoverExplorer.Console.ConsoleController.Execute(ConsoleSetting consoleSe tting) at NCoverExplorer.Console.EntryPoint.Main(String[] args)
Exiting with return code: 2
I can submit the coverage logs, if that would help. Email me at epa@dips.no if you need them.
Thanks, Erling
RE: Merging Coverage files in 2.0.4
epaulsen,
There is a fix for this bug in the beta build, which you can download here:
x86: http://ncover-beta-downloads.s3.amazonaws.com/NCover_b295.msi x64: http://ncover-beta-downloads.s3.amazonaws.com/NCover64_b295.msi
Regards, Stephen
RE: Merging Coverage files in 2.0.4
Thanks, that worked!
BTW: You might consider fixing the content-type for the downloads above, it defaults to text/plain, and I get a browser window with the msi file.
Had to right-click the download and select "Save target as", and then change the extension to MSI
RE: Merging Coverage files in 2.0.4
epaulsen,
Thanks for the heads up. I fixed the content type, so it should work as expected now.
Alan NCover Team