Merging results error
Merging results error
I've just started with a trial version checking out the possiblilities of this codecoverage tool. So far it integrates well in our test framework. Ik ran a set of automated tests with NCover that resulted in 23 Coverage xml result files (names of the files: Coverage1.xml Coverage2.xml ... up to Coverage23.xml)
I am trying to merge these results with the following command: "NcoverExplorer.console Coverage1*.xml /s:MergedCoverage.xml /h:MergedCoverage.html /r:FullCoverageReport"
The merging starts but after the first 5 files an error was thrown (see below). What am I doing wrong here? The coverage result xml files have all the same settings.
UPDATE: I've been checking out if less files can be merged or other files in my list merge without problems. I can merge the first 2 files without problems. If merge file 3 and 4 it gives the same error. If I merge the first 3 files it gives the same error as well. Probably something to do with how the xml coverage result files are made?
NCoverExplorer.Console 2.0.4.0
(c) 2007 Gnoso Inc.
http://www.ncover.com/
-- Options: Project Name: Acceptance%: 95% Sort: Name Filter: None Report Type: FullCoverageReport Html Report: index.html Merge To: MergedCoverage.xml
-- Loading file: .......\Coverage1.xml... -- Loading file: .......\Coverage10.xml... -- Loading file: .......\Coverage11.xml... -- Loading file: .......\Coverage12.xml... -- Loading file: .......\Coverage13.xml...
-- Top-level exception An entry 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, SourceFileLi st docs) at NCoverExplorer.Core.Parser.CoverageFileParser.LoadAndParseCoverageFile(CoverageModel coverageModel, String fileNa me) at NCoverExplorer.Core.Parser.CoverageFileParser.MergeFile(CoverageModel coverageModel, String fileName) at NCoverExplorer.Console.ConsoleController.MergeCoverageXmlFiles(CoverageModel coverageModel, String[] fileNames, I nt32 startIndex) at NCoverExplorer.Console.ConsoleController.LoadCoverageFiles(String[] fileNames) at NCoverExplorer.Console.ConsoleController.Execute(ConsoleSetting consoleSetting) at NCoverExplorer.Console.EntryPoint.Main(String[] args)
Exiting with return code: 2
RE: Merging results error
Tom,
this bug was reported and fixed after 2.0.4 released; the fix will be included in the next version of NCover. I've sent an updated version of the installer (which includes the fix) to your email address.
Stephen