Skip to content

Commit 19a6673

Browse files
committed
added TC branch coverage reporting
1 parent 04f78dc commit 19a6673

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/scoverage/ScoverageSbtPlugin.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,11 @@ object ScoverageSbtPlugin extends AutoPlugin {
208208

209209
def statsKeyValue(key: String, value: Int): String = s"##teamcity[buildStatisticValue key='$key' value='$value']"
210210

211-
// Log statement coverage as per: https://devnet.jetbrains.com/message/5467985
211+
// Log statement and branch coverage as per: https://confluence.jetbrains.com/display/TCD10/Custom+Chart#CustomChart-DefaultStatisticsValuesProvidedbyTeamCity
212212
log.info(statsKeyValue("CodeCoverageAbsSCovered", coverage.invokedStatementCount))
213213
log.info(statsKeyValue("CodeCoverageAbsSTotal", coverage.statementCount))
214+
log.info(statsKeyValue("CodeCoverageAbsRCovered", coverage.invokedBranchesCount))
215+
log.info(statsKeyValue("CodeCoverageAbsRTotal", coverage.branchCount))
214216

215217
// Log branch coverage as a custom metrics (in percent)
216218
log.info(statsKeyValue("CodeCoverageBranch", "%.0f".format(coverage.branchCoveragePercent).toInt))

0 commit comments

Comments
 (0)