We are trying to set up code coverage in SonarQube.
To that end we have set up Jenkins so it executes gradle task for jacoco before sonarqube task.
We have set sonar.coverage.jacoco.xmlReportPaths so it points to generated xml files.
However, coverage persists at 0% in sonarqube.
What can we do to further debug this?
Jenkins ver. 2.89.3
Sonarqube Version 7.7 (build 23042)
Hello,
To analyse your issue further, thank you for providing analysis logs. If possible in debug mode so we can have a better view on the indexed files.
Also, please attach one of your coverage reports.
Alex.
2019.08.22 03:49:48 TRACE ce[AWy4TWoN-ygTBAi2sEZQ][o.s.c.t.p.s.ScmInfoDbLoader] Reading SCM info from DB for file 'AWrhC7v7QYj4I9XxR_7f'
2019.08.22 03:49:48 TRACE ce[AWy4TWoN-ygTBAi2sEZQ][sql] time=0ms | sql=select id, project_uuid as projectUuid, file_uuid as fileUuid, created_at as createdAt, updated_at as updatedAt, binary_data as binaryData, line_hashes as rawLineHashes, line_hashes_version as lineHashesVersion, line_count as lineCount, data_hash as dataHash, src_hash as srcHash, revision from file_sources where file_uuid = ? | params=AWrhC7v7QYj4I9XxR_7f
2019.08.22 03:49:48 INFO ce[AWy4TWoN-ygTBAi2sEZQ][o.s.c.t.s.ComputationStepExecutor] Compute new coverage | status=SUCCESS | time=6094ms
2019.08.22 03:49:48 INFO ce[AWy4TWoN-ygTBAi2sEZQ][o.s.c.t.s.ComputationStepExecutor] Compute coverage measures | status=SUCCESS | time=231ms
2019.08.22 03:49:48 INFO ce[AWy4TWoN-ygTBAi2sEZQ][o.s.c.t.s.ComputationStepExecutor] Compute comment measures | status=SUCCESS | time=6ms
2019.08.22 03:49:48 TRACE ce[AWy4TWoN-ygTBAi2sEZQ][sql] time=1ms | sql=select m.id, m.metric_id as metricId, m.component_uuid as componentUuid, m.value, m.text_value as textValue, m.user_uuid as userUuid, m.description, m.created_at as createdAt, m.updated_at as updatedAt from manual_measures m where m.component_uuid=? | params=AWrYK4rBdJFWfLXqYq7Y
Apparently, it is calculating something, but coverage is still at 0%
Is there a way to verify coverage reports are actually making it so sonarqube server?
[org.gradle.internal.execution.impl.steps.CreateOutputsStep] Ensuring parent directory exists for property reports.enabledReports.xml.destination at /data/workspace/job/module_a/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml