Skip to content

Commit

Permalink
fix: Teamcity reporter modified to send proper coverage values (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mracz authored and bcoe committed Oct 17, 2016
1 parent 4e5266e commit 4147f50
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/teamcity/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,21 @@ TeamcityReport.prototype.onStart = function (node, context) {
cw.println('');
cw.println('##teamcity[blockOpened name=\''+ this.blockName +'\']');


//Statements Covered
cw.println(lineForKey(metrics.statements.covered, 'CodeCoverageAbsSCovered'));
cw.println(lineForKey(metrics.statements.total, 'CodeCoverageAbsSTotal'));
cw.println(lineForKey(metrics.statements.pct, 'CodeCoverageS'));
cw.println(lineForKey(metrics.statements.covered, 'CodeCoverageAbsBCovered'));
cw.println(lineForKey(metrics.statements.total, 'CodeCoverageAbsBTotal'));

//Branches Covered
cw.println(lineForKey(metrics.branches.covered, 'CodeCoverageAbsBCovered'));
cw.println(lineForKey(metrics.branches.total, 'CodeCoverageAbsBTotal'));
cw.println(lineForKey(metrics.branches.pct, 'CodeCoverageB'));
cw.println(lineForKey(metrics.branches.covered, 'CodeCoverageAbsRCovered'));
cw.println(lineForKey(metrics.branches.total, 'CodeCoverageAbsRTotal'));

//Functions Covered
cw.println(lineForKey(metrics.functions.covered, 'CodeCoverageAbsMCovered'));
cw.println(lineForKey(metrics.functions.total, 'CodeCoverageAbsMTotal'));
cw.println(lineForKey(metrics.functions.pct, 'CodeCoverageM'));

//Lines Covered
cw.println(lineForKey(metrics.lines.covered, 'CodeCoverageAbsLCovered'));
cw.println(lineForKey(metrics.lines.total, 'CodeCoverageAbsLTotal'));
cw.println(lineForKey(metrics.lines.pct, 'CodeCoverageL'));

cw.println('##teamcity[blockClosed name=\''+ this.blockName +'\']');
cw.close();
Expand Down

0 comments on commit 4147f50

Please sign in to comment.