ncover reporting exception?

ncover reporting exception?

Hi,

We've been using NCover 1.5.8 for a long time to cover our NUnit test results to display on CCNET Dashboard on our integration build machine. We're still using NUnit for our unit tests, but planning to use MStest in the near future. Since we wanted to support both NUnit and MSTest on our build machine, we needed to set NUnit to target runtime 4.0. However, NCover could not load NUnit anymore when we did this.

This was to be expected as it's really an old version of NCover. To stay with NCover for our test coverage, we installed the trial version of NCover (v3.3.2), which could call NUnit for the 4.0 .NET framework. The coverage reports are changed however, and we needed to adjust CCNET to use the proper XSL files.

As we create a ncover.xml for every project in the solution, we need to merge the coverage files into one xml file so we can provide that to CCNET , as I understand from the documentation. However, when I try to merge 2 or more projects, ncover.reporting.exe throws back an exception:

I created 2 coverage and xml files as follows:

Common:

"C:\Program Files\NCover\NCover.Console.exe" "C:\dev\tools\NUnit\bin\net-2.0\nunit-console.exe" /noshadow "W:\CommonTest.dll" /exclude=Integration /xml="c:\dev\Common.NUnit.xml" //a "Common" //x "c:\dev\Common.NCover.xml" //l "c:\dev\Common.NCover.log" //ea CoverageExcludeAttribute;System.Diagnostics.DebuggerNonUserCodeAttribute;System.Runtime.CompilerServices.CompilerGeneratedAttribute;System.CodeDom.Compiler.GeneratedCodeAttribute //ll Verbose //p Common

Communication.Base:

"C:\Program Files\NCover\NCover.Console.exe" "C:\dev\tools\NUnit\bin\net-2.0\nunit-console.exe" /noshadow "W:\Communication.Test.dll" /exclude=Integration /xml="c:\dev\Communication.Base.NUnit.xml" //a "Communication" //x "c:\dev\Communication.Base.NCover.xml" //l "c:\dev\Communication.Base.NCover.log" //ea CoverageExcludeAttribute;System.Diagnostics.DebuggerNonUserCodeAttribute;System.Runtime.CompilerServices.CompilerGeneratedAttribute;System.CodeDom.Compiler.GeneratedCodeAttribute //ll Verbose //p Communication.Base

And as I need to merge them for CCNet, I use the following command:

"C:\Program Files\NCover\NCover.Reporting.exe" c:\dev\*.NCover.xml //s c:\dev\merged.xml

But it throws me back the exception:

Processing report settings from the command line.

---- Top level exception: System.Exception An error occurred while loading your coverage file: url at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 file names, ICoverageReportSettings sett) at NCover.Framework.Reports.ReportingProcessor.Process() at NCover.Reporting.ReportMain.RunReport(String[] args, IOutputWriter output)

---- Inner exception: System.ArgumentException url at NCover.Framework.Models.NCover3.NCover3XmlCoverageModel.CreateDocument(Boo lean doNotAppend, Int32 requestedDocId, String url) at NCover.Framework.Models.NCover3.NCover3XmlCoverageModel.CreateDocument(Int 32 requestedDocId, String url) at NCover.Framework.Models.Merge.MergeCoverageModel.CreateDocument(ICoverageM odelDocument item, ICoverageModelModule mod, Int32 id) at NCover.Framework.Models.Merge.MergeCoverageModel.ProcessDocuments(ICoverag eModel model, Boolean isMerge) at NCover.Framework.Models.Merge.MergeCoverageModel..ctor(ICoverageModel mode l, MergeFilterMode mode) at NCover.Framework.Utilities.CoverageLoader.Merge(ICoverageView originalView , List1 paths, MergeFilterMode mode) at NCover.Framework.Utilities.CoverageLoader.Merge(List1 paths, MergeFilterM ode mode) at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 file names, ICoverageReportSettings sett)

Am I doing something wrong here?


RE: ncover reporting exception?

I'm not sure what's going on there, but whatever it is shouldn't be happening. Can you forward those coverage files to support@ncover.com so we can take a look?


RE: ncover reporting exception?

Hi Alan,

Thanks for your reply.

I've mailed the attachments to the above email address. Could you keep me updated about it?

Thanks


RE: ncover reporting exception?

Thanks Paul. Just sent you an email with more information.

If anyone else experiences this issue, the short term solution is to edit your Coverage.xml file, changing any elements with an empty url attribute to have a url attribute value of "None"


RE: ncover reporting exception?

Hi,

Thanks for your answer Alan. We've decided to wait till this is fixed before using NCover instead of implementing a quick hack to fix the coverage files for use on the CCNet Dashboard.


RE: ncover reporting exception?

Hi,

It seems this issue still remains for the latest version. It is possible now to use the original output of ncover.console.exe without merging them, which (almost) generates the same layout as the old version (which is nice so we don't need to make big changes to the XSL file created).

Mergin however still throws an exception abuot the url being empty. (from ncover.reporting.exe)


RE: ncover reporting exception?

Just as an update, this issue is fixed in the latest release of NCover, 3.4.8.