Satisfactory coverage not displayed in full report

Satisfactory coverage not displayed in full report

I'm using MSBuild to generate reports. The report is generated just fine, but when opened I don't see the thresholds applied to the report.

My target looks like this:

FullCoverageReport TestCoverage\Full\index.html Html UncoveredCodeSections TestCoverage\Uncovered\index.html Html Trends TestCoverage\Trends\index.html Html MethodCoverage Namespace 58.0 SymbolCoverage 58.0 BranchCoverage 58.0 CyclomaticComplexity 8

Any idea what is wrong?

Best regards, Michael


RE: Satisfactory coverage not displayed in full report

mbendtsen,

Thanks for your question. Nothing in the syntax is jumping out at me. Can you please tell me what version of NCover you are running? Classic or Complete? Satisfactory Thresholds are features of NCover Complete and are not available in the Classic edition.


RE: Satisfactory coverage not displayed in full report

Sorry for the delay.

I'm pretty sure it is NCover complete. It's a paid version. Is there any way to make sure?

UPDATE: Okay, just went in and found this "NCover Explore - Complete v3.4.12.6869

UPDATE2: I see that I can change the CyclomaticComplexity threshold which is reflected in the report.

This is the output:

Symbol Coverage: 56,93% (867 of 1523)
Branch Coverage: 47,96% (436 of 909)
Method Coverage: 53,66% (337 of 628)

Expected output:

Symbol Coverage: 56,93% (867 of 1523)
Branch Coverage: 47,96% (436 of 909)
Method Coverage: 53,66% (337 of 628)

This is the satisfactory threshold defined:

  <SatisfactoryCoverage>
    <Threshold>
      <CoverageMetric>MethodCoverage</CoverageMetric>
      <Value>50.0</Value>
    </Threshold>
    <Threshold>
      <CoverageMetric>SymbolCoverage</CoverageMetric>
      <Value>50.0</Value>
    </Threshold>
    <Threshold>
      <CoverageMetric>BranchCoverage</CoverageMetric>
      <Value>50.0</Value>
    </Threshold>
    <Threshold>
     <CoverageMetric>CyclomaticComplexity</CoverageMetric>
      <Value>8</Value>
    </Threshold>
  </SatisfactoryCoverage>


RE: Satisfactory coverage not displayed in full report

Now it works. I tried removing the .0 from the threshold (just 50 not 50.0) which did the trick. The only odd thing is that the documentation states that you could use decimal numbers.

http://docs.ncover.com/ref/3-0/ncover-reporting/msbuild/build-server#sct


RE: Satisfactory coverage not displayed in full report

mbendtsen,

Glad things are functioning properly. Something to know about MSBuild is that they are strongly typed. They're looking for an int when you're giving them a float. Thanks for sending me the note about the documentation. I'll be changing that today.

Keep the comments coming!