code-coverage-api-plugin icon indicating copy to clipboard operation
code-coverage-api-plugin copied to clipboard

Source file is not displayed according the cobertura report file

Open mgaert opened this issue 4 years ago • 1 comments

Version report

Jenkins and plugins versions report:

Jenkins: 2.222.1
OS: Windows Server 2012 R2 - 6.3
---
ace-editor:1.1
active-directory:2.16
analysis-model-api:8.0.1
ant:1.11
antisamy-markup-formatter:2.0
apache-httpcomponents-client-4-api:4.5.10-2.0
audit-trail:3.3
authentication-tokens:1.3
authorize-project:1.3.0
bootstrap4-api:4.4.1-12
bouncycastle-api:2.18
branch-api:2.5.5
cloudbees-folder:6.12
cobertura:1.16
code-coverage-api:1.1.5
command-launcher:1.4
conditional-buildstep:1.3.6
copy-data-to-workspace-plugin:1.0
copyartifact:1.43.1
create-fingerprint:1.2
credentials-binding:1.21
credentials:2.3.5
dashboard-view:2.12
data-tables-api:1.10.20-14
delivery-pipeline-plugin:1.4.2
display-url-api:2.3.2
docker-commons:1.16
docker-workflow:1.23
doxygen:0.18
dtkit-api:2.1.2
durable-task:1.34
echarts-api:4.6.0-8
email-ext:2.69
emailext-template:1.1
external-monitor-job:1.7
file-operations:1.9
font-awesome-api:5.13.0-1
forensics-api:0.7.0
git-client:3.2.1
git-server:1.9
gradle:1.36
handlebars:1.1.1
htmlpublisher:1.22
jackson2-api:2.10.3
javadoc:1.5
jdk-tool:1.4
join:1.21
jquery-detached:1.2.1
jquery:1.12.4-1
jquery3-api:3.4.1-10
jsch:0.1.55.2
junit:1.28
ldap:1.22
locale:1.4
lockable-resources:2.7
mailer:1.30
mapdb-api:1.0.9.0
matrix-auth:2.5
matrix-project:1.14
maven-plugin:3.5
momentjs:1.1.1
pam-auth:1.6
Parameterized-Remote-Trigger:3.1.1
parameterized-trigger:2.36
pipeline-build-step:2.12
pipeline-graph-analysis:1.10
pipeline-input-step:2.11
pipeline-milestone-step:1.3.1
pipeline-model-api:1.6.0
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.6.0
pipeline-model-extensions:1.6.0
pipeline-rest-api:2.13
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.6.0
pipeline-stage-view:2.13
plain-credentials:1.7
plugin-util-api:1.0.2
popper-api:1.16.0-6
robot:2.1.1
run-condition:1.3
scm-api:2.6.3
script-security:1.71
ssh-credentials:1.18.1
structs:1.20
subversion:2.13.1
testcomplete11-xunit:1.1
timestamper:1.11.2
token-macro:2.12
trilead-api:1.0.6
warnings-ng:8.1.0
windows-slaves:1.6
workflow-aggregator:2.6
workflow-api:2.40
workflow-basic-steps:2.19
workflow-cps-global-lib:2.16
workflow-cps:2.80
workflow-durable-task-step:2.35
workflow-job:2.38
workflow-multibranch:2.21
workflow-scm-step:2.10
workflow-step-api:2.22
workflow-support:3.4
xunit:2.3.9
  • What Operating System are you using (both controller, and any agents involved in the problem)?

Reproduction steps

  • strart runing a job configured to publish two cobertura coverage reports from two different xml files. One for unit tests and one for integration tests. 2021-05-12 15_05_18-OMAPL1xxArm_ioX Config  Jenkins
  • on each report navigate to the source file

Results

Expected result:

see the covered and uncovered lines and conditions in the source file for each report.

Actual result:

In case the want to see the result of the unit test coverage I get the graph as I expected but the source file is from the coverage which has to be linked to the integration test. In the following screenshot there is a unittest coverage of 2% line coverage. 2021-05-12 15_15_51-Jenkins_first If I look in the appended source it says I have more the 2% line coverage, because it is from the integration test report. 2021-05-12 15_18_29-Jenkins_second

mgaert avatar May 12 '21 13:05 mgaert

This also has implications with #236 and #265.

uhafner avatar Jan 09 '22 16:01 uhafner

The new step recordCoverage is now in beta testing, can you please check if this release helps to solve this issue? Please note that the syntax of the step is totally new and cannot be combined with existing results.

uhafner avatar Mar 15 '23 21:03 uhafner