Running PartCover with NUnit

I am using a sln2008 build runner and trying to get some coverage for my tests. The tests are running and passing but I am not getting any coverage reported.


I have Partcover configured in my build like this ..

Path = tools\PartCover\PartCover.exe
Include Patterns : [*]*
Report XSLT: tools\PartCover\xslt\Report By Assembly.xslt=>Coverage.html

Now it seems to run fine but when I look for the coverage report the coverage page just has "Coverage by assembly" and nothing else. If I look at the artifacts I can see the tmp file (in .teamcity/.NETCoverage/results) with the xml data and I can see that code was visited. There is a coverage.zip file with 2 html files in it - Coverage.html and index.html - both these just have "Coverage by assembly" and that's it.

Both the PartCover.exe and the Report By Assembly.xslt files are as downloaded from the PartCover site with no modifications.

Any ideas what I'm doing wrong?

Coverage.png                              artifacts.png

16 comments
Comment actions Permalink

Seems I have similar problem but with NCover + NUnit http://www.jetbrains.net/devnet/thread/285307?tstart=0

0
Comment actions Permalink

I saw your issue. Mine seems different so I started a new thread. I do not get an exception and I do get an xml file with the code coverage data, just no report.

This is my build log...

[22:30:17]: Checking for changes
[22:30:17]: Clean build enabled: removing old files from D:\TeamCity\Mother\Checkout
[22:30:17]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[22:30:17]: Checkout directory: D:\TeamCity\Mother\Checkout
[22:30:17]: Updating sources: server side checkout... (4s)
[22:30:17]: [Updating sources: server side checkout...] Will perform clean checkout
[22:30:17]: [Updating sources: server side checkout...] Clean checkout reasons
[22:30:17]: [Clean checkout reasons] Checkout directory is empty or doesn't exist
[22:30:17]: [Clean checkout reasons] "Clean all files before build" turned on
[22:30:17]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: Mother trunk
[22:30:18]: [Updating sources: server side checkout...] Building incremental patch over the cached patch
[22:30:20]: [Updating sources: server side checkout...] Repository sources transferred: 16.12Mb total
[22:30:21]: [Updating sources: server side checkout...] Removing D:\TeamCity\Mother\Checkout
[22:30:21]: [Updating sources: server side checkout...] Updating D:\TeamCity\Mother\Checkout
[22:30:22]: Starting build process in D:\TeamCity\Mother\Checkout
[22:30:23]: Project "Mother.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690;NUnit_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690 target(s)): (17s)
[22:30:23]: [Project "Mother.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690;NUnit_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690 target(s)):] Project "Mother.sln" (Clean;Rebuild target(s)): (4s)
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Building solution configuration "Release|Any CPU".
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "DeployMother.csproj" (Clean target(s)):
[22:30:23]: [Project "DeployMother.csproj" (Clean target(s)):] Creating directory "obj\Release\".
[22:30:23]: [Project "DeployMother.csproj" (Clean target(s)):] Successfully cleaned the output for 0 EDMX files.
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Server.csproj" (Clean target(s)):
[22:30:23]: [Project "Server.csproj" (Clean target(s)):] Creating directory "obj\Release\".
[22:30:23]: [Project "Server.csproj" (Clean target(s)):] Successfully cleaned the output for 0 EDMX files.
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Tests.csproj" (Clean target(s)):
[22:30:23]: [Project "Tests.csproj" (Clean target(s)):] Creating directory "obj\Release\".
[22:30:23]: [Project "Tests.csproj" (Clean target(s)):] Successfully cleaned the output for 0 EDMX files.
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Server.csproj" (Clean target(s)):
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Web projects do not support the "Clean" target. Continuing with remaining projects ...
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Deleting file "Mother.sln.cache".
[22:30:23]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "DeployMother.csproj" (Rebuild target(s)):
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Processing 0 EDMX files.
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Finished processing 0 EDMX files.
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Creating directory "bin\Release\".
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\DeployMother.exe /resource:deployment.xml,DeployMother.deployment.xml /target:exe Program.cs Properties\AssemblyInfo.cs
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Copying file from "D:\TeamCity\Mother\Checkout\build\DeployMother\deployment.xml" to "bin\Release\deployment.xml".
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Copying file from "obj\Release\DeployMother.exe" to "bin\Release\DeployMother.exe".
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] DeployMother -> D:\TeamCity\Mother\Checkout\build\DeployMother\bin\Release\DeployMother.exe
[22:30:23]: [Project "DeployMother.csproj" (Rebuild target(s)):] Copying file from "obj\Release\DeployMother.pdb" to "bin\Release\DeployMother.pdb".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Server.csproj" (Rebuild target(s)):
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Processing 0 EDMX files.
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Finished processing 0 EDMX files.
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Creating directory "bin\Release\".
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\Mother.Server.dll /target:library Database\ConnectionStringProvider.cs DTO\ActionResult.cs DTO\ListLineItem.cs DTO\SearchCriteria.cs DTO\TransferDto.cs Interfaces\ICheckModel.cs Interfaces\ICheckView.cs Interfaces\IDefaultPresenter.cs Interfaces\IDefaultView.cs Interfaces\ISharedModel.cs Interfaces\ISharedPresenter.cs Interfaces\ISharedView.cs Interfaces\ITransactionModel.cs Interfaces\ITransactionPresenter.cs Interfaces\ITransactionView.cs Models\CheckModel.cs Models\HelperMethods.cs Interfaces\IListModel.cs Models\ListModel.cs Models\SharedModel.cs Models\TransactionModel.cs Presenters\CheckPresenter.cs Presenters\DefaultPresenter.cs DTO\TransactionDto.cs Presenters\SharedPresenter.cs Presenters\TransactionPresenter.cs Properties\AssemblyInfo.cs
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Mother.Server.dll" to "bin\Release\Mother.Server.dll".
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Server -> D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.dll
[22:30:24]: [Project "Server.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Mother.Server.pdb" to "bin\Release\Mother.Server.pdb".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Tests.csproj" (Rebuild target(s)):
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Processing 0 EDMX files.
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Finished processing 0 EDMX files.
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Creating directory "bin\Release\".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Project "Server.csproj" (GetTargetPath target(s)):
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Project "Server.csproj" (GetNativeManifest target(s)):
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.dll /reference:..\..\..\tools\NUnit\nunit.framework.dll /reference:..\..\..\tools\Rhino\Rhino.Mocks.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\Tests.dll /target:library Properties\AssemblyInfo.cs Server\Presenters\DefaultPresenterTests.cs Server\Presenters\TransactionPresenterTests.cs
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.dll" to "bin\Release\Mother.Server.dll".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "..\..\..\tools\NUnit\nunit.framework.dll" to "bin\Release\nunit.framework.dll".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "..\..\..\tools\Rhino\Rhino.Mocks.dll" to "bin\Release\Rhino.Mocks.dll".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.pdb" to "bin\Release\Mother.Server.pdb".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "..\..\..\tools\Rhino\Rhino.Mocks.xml" to "bin\Release\Rhino.Mocks.xml".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Project "Server.csproj" (GetCopyToOutputDirectoryItems target(s)):
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Tests.dll" to "bin\Release\Tests.dll".
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Tests -> D:\TeamCity\Mother\Checkout\src\test\Tests\bin\Release\Tests.dll
[22:30:24]: [Project "Tests.csproj" (Rebuild target(s)):] Copying file from "obj\Release\Tests.pdb" to "bin\Release\Tests.pdb".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Server.csproj" (Rebuild target(s)):
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Project "Server.csproj" (GetTargetPath target(s)):
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Creating directory "src\app\Web\Bin".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Copying file from "D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.dll" to "src\app\Web\\Bin\Mother.Server.dll".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] Copying file from "D:\TeamCity\Mother\Checkout\src\app\Server\bin\Release\Mother.Server.pdb" to "src\app\Web\\Bin\Mother.Server.pdb".
[22:30:24]: [Project "Mother.sln" (Clean;Rebuild target(s)):] C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /Web -p src\app\Web\ -u -f PrecompiledWeb\Web\
[22:30:28]: [Project "Mother.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690;NUnit_TeamCity_generated_c4e7885c5aa74283b0c8f746b46d9690 target(s)):] c:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\TeamCity\buildAgent\temp\buildTmp\tmp3099.tmp
[22:30:33]: Start TeamCity NUnit Test Runner
[22:30:33]: TeamCity Test Reordering. Phase 1: Running selected tests.
[22:30:34]: Tests.dll
[22:30:35]: TeamCity Test Reordering. Phase 2: Running the rest of the tests.
[22:30:36]: Tests.dll (1s)
[22:30:36]: [Tests.dll] Mother.Tests.Server.Presenters.DefaultPresenterTests.ChangeUserTest
[22:30:37]: [Tests.dll] Mother.Tests.Server.Presenters.DefaultPresenterTests.LoadTest
[22:30:37]: [Tests.dll] Mother.Tests.Server.Presenters.TransactionPresenterTests.CancelTest
[22:30:37]: [Tests.dll] Mother.Tests.Server.Presenters.TransactionPresenterTests.LoadTest
[22:30:37]: Tests run: 4, Errors: 0, Failures: 0, Inconclusive: 0 Time: 0 seconds   Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
[22:30:40]: ##teamcity[importData type='dotNetCoverage' tool='partcover' file='C:\TeamCity\buildAgent\temp\buildTmp\tmp38A1.tmp']
[22:30:41]: Importing data from 'C:\TeamCity\buildAgent\temp\buildTmp\tmp38A1.tmp' with 'dotNetCoverage' processor
[22:30:41]: Process exit code: 0
[22:30:41]: Waiting for 1 service processes to complete
[22:30:41]: Processing 1 coverage report(s)
[22:30:41]: Generating coverage report by PartCover xslt for files: [C:\TeamCity\buildAgent\temp\buildTmp\tmp38A1.tmp]
[22:30:41]: Generating report: D:\TeamCity\Mother\Checkout\tools\PartCover\xslt\Report By Assembly.xslt=>Coverage.html, to file: C:\TeamCity\buildAgent\temp\buildTmp\teamcity7537xslt-report\Coverage.html
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='0.0']
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='0.0']
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsCCovered' value='0.0']
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='0.0']
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='0.0']
[22:30:42]: ##teamcity[buildStatisticValue key='CodeCoverageAbsCTotal' value='0.0']
[22:30:42]: Publishing artifacts
[22:30:42]: [Publishing artifacts] Paths to publish: [C:\TeamCity\buildAgent\temp\buildTmp\tmp38A1.tmp=>.teamcity/.NETCoverage/results]
[22:30:42]: [Publishing artifacts] Publishing artifacts 'C:/TeamCity/buildAgent/temp/buildTmp/tmp38A1.tmp' to .teamcity/.NETCoverage/results
[22:30:42]: Publishing artifacts
[22:30:42]: [Publishing artifacts] Paths to publish: [C:\TeamCity\buildAgent\temp\buildTmp\coverage7540zip\coverage.zip=>]
[22:30:42]: [Publishing artifacts] Publishing artifacts 'C:/TeamCity/buildAgent/temp/buildTmp/coverage7540zip/coverage.zip' to root artifacts directory
[22:30:42]: Publishing artifacts
[22:30:42]: [Publishing artifacts] Paths to publish: [**/PrecompiledWeb/Web/** => dist, teamcity-info.xml]
[22:30:42]: [Publishing artifacts] Publishing artifacts '**/PrecompiledWeb/Web/**' to dist
[22:30:42]: Build finished
0
Comment actions Permalink

And here is a snippet of the xml file from the artifacts

 <Type asmref="39" name="Mother.Server.Presenters.TransactionPresenter" flags="0">
  <Method name="Update" sig="void  ()" bodysize="63" flags="0" iflags="0" />
  <Method name=".ctor" sig="void  (Mother.Server.Interfaces.ITransactionView, Mother.Server.Interfaces.ITransactionModel)" bodysize="50" flags="0" iflags="0">
   <pt visit="2" pos="0" len="6" fid="115" sl="19" sc="5" el="19" ec="80" />
   <pt visit="2" pos="6" len="3" fid="115" sl="21" sc="7" el="21" ec="24" />
   <pt visit="0" pos="9" len="11" fid="115" sl="22" sc="9" el="22" ec="82" />
   <pt visit="2" pos="20" len="3" fid="115" sl="23" sc="7" el="23" ec="25" />
   <pt visit="0" pos="23" len="11" fid="115" sl="24" sc="9" el="24" ec="83" />
   <pt visit="2" pos="34" len="7" fid="115" sl="25" sc="7" el="25" ec="20" />
   <pt visit="2" pos="41" len="7" fid="115" sl="26" sc="7" el="26" ec="22" />
   <pt visit="2" pos="48" len="1" fid="115" sl="27" sc="5" el="27" ec="6" />
  </Method>
  <Method name="NewRecordButtons" sig="void  ()" bodysize="50" flags="0" iflags="0">
   <pt visit="1" pos="0" len="12" fid="115" sl="130" sc="7" el="130" ec="38" />
   <pt visit="1" pos="12" len="12" fid="115" sl="131" sc="7" el="131" ec="41" />
   <pt visit="1" pos="24" len="12" fid="115" sl="132" sc="7" el="132" ec="40" />
   <pt visit="1" pos="36" len="12" fid="115" sl="133" sc="7" el="133" ec="41" />
   <pt visit="1" pos="48" len="1" fid="115" sl="134" sc="5" el="134" ec="6" />
  </Method>
  <Method name="Load" sig="void  ()" bodysize="226" flags="0" iflags="0">
   <pt visit="1" pos="0" len="12" fid="115" sl="31" sc="7" el="31" ec="43" />
   <pt visit="1" pos="12" len="9" fid="115" sl="33" sc="7" el="33" ec="33" />
   <pt visit="0" pos="21" len="11" fid="115" sl="34" sc="9" el="34" ec="46" />
   <pt visit="1" pos="32" len="13" fid="115" sl="36" sc="7" el="36" ec="35" />
   <pt visit="1" pos="45" len="28" fid="115" sl="38" sc="7" el="38" ec="53" />
   <pt visit="1" pos="73" len="8" fid="115" sl="40" sc="7" el="40" ec="19" />
   <pt visit="0" pos="81" len="25" fid="115" sl="42" sc="9" el="42" ec="57" />
   <pt visit="0" pos="106" len="17" fid="115" sl="43" sc="9" el="43" ec="33" />
   <pt visit="1" pos="123" len="29" fid="115" sl="46" sc="7" el="46" ec="63" />
   <pt visit="1" pos="152" len="28" fid="115" sl="47" sc="7" el="47" ec="60" />
   <pt visit="1" pos="180" len="6" fid="115" sl="49" sc="7" el="49" ec="28" />
   <pt visit="1" pos="186" len="8" fid="115" sl="51" sc="7" el="51" ec="18" />
   <pt visit="1" pos="194" len="6" fid="115" sl="52" sc="9" el="52" ec="28" />
   <pt visit="1" pos="200" len="1" />
   <pt visit="0" pos="201" len="6" fid="115" sl="55" sc="9" el="55" ec="33" />
   <pt visit="0" pos="207" len="6" fid="115" sl="57" sc="9" el="57" ec="31" />
   <pt visit="0" pos="213" len="1" fid="115" sl="59" sc="5" el="59" ec="6" />
  </Method>
  <Method name="ModifyRecordButtons" sig="void  ()" bodysize="50" flags="0" iflags="0" />
  <Method name="SetTransactionDetails" sig="void  ()" bodysize="212" flags="0" iflags="0" />
  <Method name="GetListofDetails" sig="void  ()" bodysize="43" flags="0" iflags="0">
   <pt visit="1" pos="0" len="18" fid="115" sl="84" sc="7" el="84" ec="59" />
   <pt visit="1" pos="18" len="12" fid="115" sl="85" sc="7" el="85" ec="32" />
   <pt visit="1" pos="30" len="1" fid="115" sl="86" sc="5" el="86" ec="6" />
  </Method>
  <Method name="SetBaseDataForForm" sig="void  ()" bodysize="136" flags="0" iflags="0">
   <pt visit="1" pos="0" len="24" fid="115" sl="90" sc="7" el="90" ec="66" />
   <pt visit="1" pos="24" len="12" fid="115" sl="91" sc="7" el="91" ec="41" />
   <pt visit="1" pos="36" len="12" fid="115" sl="92" sc="7" el="92" ec="41" />
   <pt visit="1" pos="48" len="24" fid="115" sl="94" sc="7" el="94" ec="65" />
   <pt visit="1" pos="72" len="12" fid="115" sl="95" sc="7" el="95" ec="39" />
   <pt visit="1" pos="84" len="16" fid="115" sl="97" sc="7" el="97" ec="34" />
   <pt visit="1" pos="100" len="17" fid="115" sl="98" sc="7" el="98" ec="24" />
   <pt visit="1" pos="117" len="6" fid="115" sl="100" sc="7" el="100" ec="26" />
   <pt visit="1" pos="123" len="1" fid="115" sl="101" sc="5" el="101" ec="6" />
  </Method>
  <Method name="Save" sig="void  ()" bodysize="63" flags="0" iflags="0" />
  <Method name="Cancel" sig="void  ()" bodysize="13" flags="0" iflags="0">
   <pt visit="1" pos="0" len="11" fid="115" sl="115" sc="7" el="115" ec="23" />
   <pt visit="1" pos="11" len="1" fid="115" sl="116" sc="5" el="116" ec="6" />
  </Method>
</Type>
0
Comment actions Permalink

Nope, I have the exception because I entered wrong value for NCover Arguments field (as Eugene suggested). When I don't enter value for NCover Argument field, or enter the correct one, I have similar result as yours.

0
Comment actions Permalink

In case it matters I am running Windows 7  x64.

0
Comment actions Permalink

Also if I look at the settings tab of the build configuration

I see this

settings.png

Notice it says Code coverage is disabled. When I go into Edit Configuration Settings for the runner I do not see any way to enable .NET Coverage other than selecting the .NET Coverage tool which I have done.

John.

0
Comment actions Permalink

The 'Code Coverage' field is for Java, if you change build runner to Ipr or Ant, you will see it.

0
Comment actions Permalink

Any chance somebody made it work?

As for my observations - I was unsuccessfully trying to execute MsTest runner under partcover. After some time I gave up and tried "NUnit 2.2.9 VSTS and MSTest (deprecated)" which actually worked out (wondering why its deprecated then), and at last I ended up with empty report. BTW in my case I have empty report html files generated however Code Coverage tab is empty - not even "Report by Assembly" title there...

Another one - I tried http://www.jetbrains.net/devnet/message/5249489#5249489 double dot trick - all I achieved was some scrollbar special effects... (now thinking of downgrading to unstable versions before this bug was fixed)

And the 'Code Coverage' field setting is MEGA-confusing!!! especially in light of absence of comments regarding inability to work in conjunction with MsTests.

0
Comment actions Permalink

I tried the double dot work around from http://www.jetbrains.net/devnet/message/5249489 but that does not seem to be my problem. I was not missing a dot originally and with two dots I end up with two dots in my coverage file name (which has no results anyway).

I feel I am so close to getting results.

0
Comment actions Permalink

This could be a fix but not for me (

The problem was actually with broken XSLT's of dev branch of partcover. There is an easy way to fix it for class report:

1 Replace /PartCoverReport/type with /PartCoverReport/Type as well as all other "type" to "Type";
2 method => Method
3 method/code/pt => Method/pt

This should fix the issue if you have "Coverage by class" header on your Code Coverage Tab.

As for me - this fixed file stored in coverage.zip, however Code Coverage Tab is still empty...
I was a bit disappointed with partcover's report - maybe it worth a try to port one from NCoverExplorer...

0
Comment actions Permalink

The last issue and it works for me finally

Seems that partcover report or some part of it was incompatible with google chrome latest dev build. Chrome beta or any other browser - work.

0
Comment actions Permalink

This did not work for me. I did get some output though (all 0%)

zero.png

If I take the tmp file from the artifacts and rename it with an xml extension I can open it with the partcover.browser.exe and it shows the expected results with methods covered and a the right percentage coverage. So it does look like the xslt file is at busted.

So close!!!

John.

0
Comment actions Permalink

I'm working on some custom xslt now - ideally I want to have output like NCoverExplorer report but i still have to do some things, and i'm doing it at my free time, an i'm not an expert in xslt either, but hopefully it will work out some day. To be honest it seems that it's easier to patch partcover instead .

0
Comment actions Permalink

Good luck with that! I too have some rudimentary xslt and contemplated the job. In the end I tried out NCover and got it working. It has nice output.

I only wish I could fail the build if coverage falls below a certain value.

John.

0
Comment actions Permalink

Here's preliminary version of the report xslt - no js, no aseembly or project statistics yet. And i'm not sure about numbers too :). Coverage calculation seems a bit more complicated than I expected - partcover dont instrument methods unless these methods have been hit at least once. Moreover partcover dont calculate length of sourcecode for these methods either - therefore the only way to measure method size - is it's IL size as far as I understand @codesize attribute, so it's not even line/char. coverage in common sense.

Should work for partcover:
application version 2.3.35108
connector version 2.3.35108
latest dev build....

and Teamcity 5.01


Regards,
Sergiy

Attachment(s):
Report By Class.xslt.zip
0

Please sign in to leave a comment.