Skip to content

Teamcity stats are incomplete #172

Closed
@idonman

Description

@idonman

For code coverage summary (with diffs from previous build) to appear in overview tab,
the following stats must be sent:

a) Lines or Classes
b) Blocks
c) Statements or Methods.

As per current code

Only statements stats are being sent:

    log.info(statsKeyValue("CodeCoverageAbsSCovered", coverage.invokedStatementCount))
    log.info(statsKeyValue("CodeCoverageAbsSTotal", coverage.statementCount))

But blocks are sent as custom stat:
CodeCoverageBranch

So, 2 stats are missing at the moment:

  1. Block coverage stats must be sent as:
##teamcity[buildStatisticValue key='CodeCoverageB' value=' <value>'] 
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='<value>']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='<value>']
  1. Lines or Classes. Lines can be excluded, in favor of statements stats. Thus classes total coverage must be calculated and sent, so that teamcity coverage summary could appear on build overview tab:
##teamcity[buildStatisticValue key='CodeCoverageC' value='<value>']
##teamcity[buildStatisticValue key='CodeCoverageAbsCCovered' value='<value>']
##teamcity[buildStatisticValue key='CodeCoverageAbsCTotal' value='<value>'] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions