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
Please sign in to leave a comment.
Hi
DotCover is not compatible with Gallio at the moment. Please watch/vote for DCVR-1343.
Thanks
Michael
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??
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
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.
but my main problem is that dotcover is not able to do Code coverage for MbUnit Test Cases
Is there any way for it?
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.
Please see http://www.mail-archive.com/mbunituser@googlegroups.com/msg02347.html for more details
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=""$(DotCoverPath)" c "$(AnalyseFile)"" 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]: 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...
Could you please try upgrating to latest dotCover 1.1 EAP build.
i think i have the latest one i had downloaded it from http://confluence.jetbrains.net/display/DCVR/dotCover+Early+Access+Program
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??
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.
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