karma-runner / karma-runner/karma-coverage
Blocks coverage is not reported in teamcity
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
In the build output I see karma coverage prints following summary
[19:22:57]Statements : 94.88% ( 2686/2831 )
[19:22:57]Branches : 88.19% ( 620/703 )
[19:22:57]Functions : 93.12% ( 798/857 )
[19:22:57]Lines : 94.93% ( 2601/2740 )
But in Teamcity Build summary I see only following numbers:
Code coverage summary
Methods: 93.1% 798/857
Lines: 94.9% 2601/2740
I think Block coverage could be shown here if it will be properly reported.
As I understand this is the result of the following output:
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageB' value='94.88']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='798']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='857']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageM' value='93.12']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='2601']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='2740']
[19:22:58]##teamcity[buildStatisticValue key='CodeCoverageL' value='94.93']
Aa per
https://confluence.jetbrains.com/pages/viewpage.action?pageId=74847395#HowTo...-ImportcoverageresultsinTeamCity
> You should not publish values CodeCoverageB, CodeCoverageL, CodeCoverageM, CodeCoverageC standing for block/line/method/class coverage percentage. TeamCity will calculate these values using their absolute parts. E.g. CodeCoverageL will be calculated as CodeCoverageAbsLCovered divided by CodeCoverageAbsLTotal.
> You could publish these values but in this case they will lack decimal parts and will not be useful.
Contributor guide
Research direction
Start by tracing the TeamCity coverage-statistic output described in the issue and compare the emitted block, method, and line values with the Karma coverage summary. Confirm how TeamCity derives its summary from the absolute coverage parts; done means the TeamCity build summary reports block coverage with the expected counts and percentage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- ci-cd, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100