How Can Produce A Test Coverage Report On Multiple Projects

Hi,

I'm trying to figure how to see test coverage for a group of projects together.  Or more generally to be able to create and save custom reports based on statistics on more than one project.

I can't really see how to do this, any help would be appreciated.

3 comments

Can you please describe this in more detail?
Do these projects runs tests over the same codebase?
What kind of reports do you have and what do you want to achieve?
What coverage engine do you use?
What TeamCity version do you use?

Probably the way to approach this is to collect raw coverage data fles from all the test runs, then load them all onto a single place and perform coverage engine-specific merging. Then generate the HTML report over the merged data.

0

I believe the original question is the exact question we have right now.  We have multiple projects, from different code bases.  We are using Team City 7 and DotCover for our test coverage tool.  We would like to have a single page where we can get code coverage metrics on all of our projects.  Can someone please help me with this?

Thanks

0

Here is one work-around using the output from dotCover-
Create a "Metrics" build to:
1) Extract the coverage data from TeamCity's build artifacts
    -- \\[TCServer]\TeamCity\.BuildServer\system\artifacts\[ProjectName]\[BuildConfig]\[BuildRunNumber]\.teamcity\.NETCoverage\CoverageReport.xml
        --- The root node contains CoveredStatements="X" TotalStatements="X" CoveragePercent="100"
2) Publish the results as service messages
    -- ##teamcity[buildStatisticValue key='ProjectNameKey' value='100']
3) - Display on the statistics tab as custom graphs
    -- Edit \\[TCServer]\TeamCity\.BuildServer\config\main-config.xml
        --- <graph title="[ProjectName] Code Coverage" seriesTitle="Project" format="percent">
            <valueType key="ProjectNameKey" title=" [ProjectName]"/>
            </graph>
        --- see http://confluence.jetbrains.net/display/TCD7/Custom+Chart for details

0

Please sign in to leave a comment.