Make sure to tell us:
version: 188.8.131.52811 - enterprise edition
Sonar Scanner running on Github Actions Runner - Ubuntu latest
What’s the issue you’re facing?
Hi I am running into an issue in my branch where the code coverage looks to be lower that what I would expect based on the coverage reports outputted by Jest and what I am seeing outputted by SonarQube for conditional code coverage.
For our CI/CD process we use Github actions, and for this specific repo we have three test jobs that execute and focus on three different types of tests. Each test job outputs a jest coverage report:
All three of these coverage reports are then analyzed by SonarQube to determine if the branch passes the code coverage gate we have set in place. However, I am experiencing a discrepancy for the conditional coverage for SonarQube shows 56% percent but in Jest the branch, function, and Statements section show a higher percentage in 2/3 coverage reports
coverage results in jest:
lcov-unit.info - movement-score.entity.ts | 100 | 100 | 100 |
lcov-integration.info - movement-score.entity.ts | 89.85 | 66.66 | 85.71 |
lcov-e2e.info - file does not contain data on this file as it was not tested in this test suite
coverage report in sonarqube: