Missing seqpnt element in coverage report (NCover 1.5.5)

Missing seqpnt element in coverage report (NCover 1.5.5)

I'm using NCover 1.5.5 on .NET v2.0.50727 to generate coverage reports for two assemblies. Both assembly reference another assembly containing a class called RawLoggerJob. I have written unittest for both assemblies which refer the RawLoggerJob class. One of the unittests creates a new instance of RawLoggerJob, the other does not. This is part of my coverage output:

Coverage report for test which creates the RawLoggerJob.

    <method name=".ctor" class="Company.RawLoggerJob">
      <seqpnt visitcount="6" line="19" column="5" endline="19" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="21" column="7" endline="26" endcolumn="36" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="28" column="7" endline="28" endcolumn="41" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="29" column="7" endline="29" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="30" column="7" endline="30" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="31" column="7" endline="31" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="32" column="7" endline="32" endcolumn="20" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="33" column="7" endline="33" endcolumn="30" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="6" line="34" column="5" endline="34" endcolumn="6" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
    </method>

Coverage report for test which does not create the RawLoggerJob.

    <method name=".ctor" class="Company.RawLoggerJob">
      <seqpnt visitcount="0" line="19" column="5" endline="19" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="20" column="5" endline="20" endcolumn="6" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="21" column="7" endline="26" endcolumn="36" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="28" column="7" endline="28" endcolumn="41" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="29" column="7" endline="29" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="30" column="7" endline="30" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="31" column="7" endline="31" endcolumn="45" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="32" column="7" endline="32" endcolumn="20" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="33" column="7" endline="33" endcolumn="30" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
      <seqpnt visitcount="0" line="34" column="5" endline="34" endcolumn="6" excluded="false" document="C:\RawLoggerJobs\RawLoggerJob.cs" />
    </method>

The coverage output from the test which creates the RawLoggerJob is missing the seqpnt line 20. The line is a '{' character in the code.


Re: NCover Report when Unit Tests Fail

Andy,

Where is your <merge> section within the <project> in your ccnet.config file? In your <tasks> or <publishers> section - it needs to be in the latter to ensure it runs regardless of task failures.


Re: NCover Report when Unit Tests Fail

Thanks Grant.

I have it in my publishers section.

It seems to be an intermitten problem and appears only to happen when the Build directory is removed and the source checked out again.

It fails the first time after this but subsequent runs appear ok.

I will look into this further and post any steps that reproduce it.

 

Andy


Re: NCover Report when Unit Tests Fail

Andy,

Are you using Subversion by chance? There are some known issues with that - see the Subversion source control block page in the CC.Net documentation.


Re: NCover Report when Unit Tests Fail

Yeah Grant, I am using Subversion.

Although I am only using CCNet to monitor changes to the repository and then using MSBuild to remove the build folder and then checkout all the source again, so CCNet does very little.

I will check this out and see if it can explain what I am experiencing.

Thanks again,

Andy