PartCover shows 0% when tests exists

Bolek
2008-10-01
2013-04-29
  • Bolek
    Bolek
    2008-10-01

    I'm currently writing MSBuild task for PartCover, and I wanted to see if it's working. Apparently it is, but it shows 0% code coverage, whereas I have some tests, and I would expect PartCover report not to ahow all 0-s :/
    Anyway, here is the code for PartCoverTask, http://btekielski.googlepages.com/partcover.cs and for tests project, http://btekielski.googlepages.com/partcovertests.cs . I invoke PartCover like that:

        C:\CI\buildbot\tools\PartCover .NET 2\PartCover.exe --target="C:\CI\buildbot\tools\NUnit-2.4.8\bin\nunit-console.exe" --target-work-dir=C:\CI\Projects\PartCoverTask\WorkDir --target-args=C:\CI\Projects\PartCoverTask\Source\PartCoverTask
    Tests\bin\Release\PartCoverTask.dll --include=[*]* --exclude=[nunit*]* --exclude=[*Test*]* --exclude=[Microsoft.*]* --output=C:\CI\Projects\PartCoverTask\ArtefactsDir\PartCover-report.xml

    Now I wonder why does PartCover show 0% code coverage, when obviously at least three methods are tested ??

    I'd be grateful for any hints, 'coz I'm kind of new to code ceverage analysis, and PartCOver especially...

     
    • Loginov Oleg
      Loginov Oleg
      2008-10-03

      could you publish the xml report file?

       
    • Bolek
      Bolek
      2008-10-04

      Sure.
      Here's the xml report, btekielski.googlepages.com/PartCover-report.xml .
      What's weird is that if I run analysis from GUI, I got expected results: btekielski.googlepages.com/PartCover-report-GUI.xml , with following settings: btekielski.googlepages.com/set.xml, even if I run it with the same (I think) arguments:

          C:\CI\buildbot\tools\PartCover .NET 2\PartCover.exe --target="C:\CI\buildbot
      \tools\NUnit-2.4.8\bin\nunit-console.exe" --target-work-dir=C:\CI\Projects\PartC
      overTask\Source\PartCoverTaskTests\bin\Release --target-args=PartCoverTask.dll -
      -include=[*]* --exclude=[nunit*]* --exclude=[*Test*]* --exclude=[Microsoft.*]* -
      -output=C:\CI\Projects\PartCoverTask\ArtefactsDir\PartCover-report.xml