Code coverage using Dotcover

Hi
we use MbUnit for Unit Testing (Gallio)
They are running fine in Teamcity through msbuild, it is also showing correct Test results

I want is code coverage with that tests
We have diffenrent type of projects some are just DLL base (do not have excutable) and some are executable

So we want code coverage using dot cover, through the teamcity
Please guide me through it

13 comments
Comment actions Permalink

Hi

DotCover is not compatible with Gallio at the moment. Please watch/vote for DCVR-1343.

Thanks
Michael

0
Comment actions Permalink

Hi thnx for your reply

then is there anyway so that we can use Code coverage for MbUnit test cases while building projects through Teamcity via msbuild

and in which version will dotcover be compatible with gallio??

0
Comment actions Permalink

I think TeamCity 6.0.2 currently only supports tests that are run with NUnit. At least that is what it says when configuring dotCover.

Daniel

0
Comment actions Permalink

Please see http://confluence.jetbrains.net/display/TCD6/Manually+Configuring+Reporting+Coverage
for details how to post customly created snapshots to TeamCity.
I believe it could be possible to make Gallio TeamCity plugin to post service messages with dotCover created snaphot file paths.

At the end of the build TeamCity will merge all reported snapshots, generate HTML report and publish statistic values.

0
Comment actions Permalink

but my main problem is that dotcover is not able to do Code coverage for MbUnit Test Cases
Is there any way for it?

0
Comment actions Permalink

Gallio/MBUnit testing framework start child processes to execute unit tests. Please refer to Gallio documentation to know how to make Gallio running code coverage. There should be commandline arguments for it.

0
Comment actions Permalink

Hi thnx for ur reply
i am now able to generate output.xml containing codecoverage results, i am using folllowing target

<Target Name="CodeCoverage">
    <PropertyGroup>
      <DotCoverPath>C:\Program Files\JetBrains\dotCover\v1.0\Bin\dotCover.exe</DotCoverPath>
       <AnalyseFile>C:\CI Build\Products\Code\analyse.xml</AnalyseFile>
      <OutputXmlPath>C:\CI Build\Products\Code\Output.xml</OutputXmlPath>
    </PropertyGroup>

 
    <Exec Command="&quot;$(DotCoverPath)&quot; c &quot;$(AnalyseFile)&quot;" ContinueOnError="true"></Exec>

    <Message Text="##teamcity[importData type='dotNetCoverage' tool='dotcover' path='$(OutputXmlPath)']"></Message>
</Target>




But  reports are not getting seen in TeamCity.. as it should be shown in Code Coverage tab (Tab has not been created)

Following is the Log Shown in Teamcity Build

[11:31:43]: Importing data from 'C:\CI Build\Products\Code\Output.xml' with 'dotNetCoverage' processor
[11:31:43]: Process exited with code 0
[11:31:43]: Waiting for 1 service processes to complete
[11:31:43]: Processing 1 coverage report(s)
[11:31:43]: Generating coverage report by dotcover for files: [C:\CI Build\Products\Code\Output.xml]
[11:31:43]: Failed to find: null
[11:31:43]: Publishing artifacts
[11:31:43]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[11:31:43]: [Publishing artifacts] Sending files
[11:32:33]: Build finished

Can you Please help...
1
Comment actions Permalink

Could you please try upgrating to latest dotCover 1.1 EAP build.

0
Comment actions Permalink

hi,

Following is the Log seen (end of it) when i run the Dotcover from commandline


  Disposing the test runner.
  Stop time: 12:15 PM (Total execution time: 491.033 seconds)


  654 run, 646 passed, 8 failed, 0 inconclusive, 0 skipped


  Analysed application exited with code '1'
  Coverage session finished [3/23/2011 12:15:19 PM]
  Snapshot merging started [3/23/2011 12:15:19 PM]
  Source snapshots number: 2
  Merging snapshots 1-2
  Snapshot merging failed [3/23/2011 12:15:19 PM]. Null AssemblyName


So i dont get the XML or HTML report
What may be the problem??

0
Comment actions Permalink

Hello Chittoori,
Could you please try the following:
- download dotCover build 1.1.219.7 from our nightly builds page
(http://confluence.jetbrains.net/display/DCVR/dotCover+1.1+Nightly+Builds),
- run it with additional parameter /LogFile=path_to_the_log_file
- in case if coverage analysis will not succeed, please send us that log to support@jetbrains.com with subject containing "dotCover" word.
Thanks in advance.

0
Comment actions Permalink

Hi Chittoori:

Do you still remember where the analyse.xml file comes from? I am trying to do the same as you did. but I don't know what is in the analyse.xml file and where it comes from.

Thanks

Xiali

0

Please sign in to leave a comment.