Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cobertura report #67

Open
cromefire opened this issue Nov 19, 2021 · 10 comments
Open

Add Cobertura report #67

cromefire opened this issue Nov 19, 2021 · 10 comments
Labels
Feature Feature request issue type Implement in KGP

Comments

@cromefire
Copy link

I haven't drilled down on the XML format specifically and there doesn't seem to be any indication of it's format (from the code it seems to be agent specific?).

GitLab only supports the cobertura format natively (conversion from JaCoCo is available, but needs some python script), so it would be really cool if a native cobertura report would be available for fast and easy integration into GitLab.

@shanshin
Copy link
Collaborator

By the way, the IntelliJ agent generates XML with the same format as JaCoCo (with some differences that will be removed in future releases).
You can try to use a JaCoCo converter for IntelliJ's XML file and if there are any issues with it, we will fix format.

@IRus
Copy link

IRus commented Jul 19, 2022

By the way, the IntelliJ agent generates XML with the same format as JaCoCo (with some differences that will be removed in future releases). You can try to use a JaCoCo converter for IntelliJ's XML file and if there are any issues with it, we will fix format.

This is not an ideal solution, since it's involves 3rd party converters like registry.gitlab.com/haynes/jacoco2cobertura:1.0.7 and additional setup (extra step in pipeline, extra image)

https://gitlab.com/haynes/jacoco2cobertura/-/blob/main/cover2cover.py

@mmikhulya
Copy link

mmikhulya commented Jul 27, 2022

jacoco2cobertura fails to convert IntelliJ's XML file, because it doesn't contain sessioninfo element with start attribute.
Also it fails on branch-rate and complexity counters because kover supports only line counters for now.

@tjerkw
Copy link

tjerkw commented Sep 2, 2022

This plugin supports sessioninfo:
https://github.com/razvn/jacoco-to-cobertura-gradle-plugin/

But doesn't support other sourcesets than main yet
razvn/jacoco-to-cobertura-gradle-plugin#6

@shanshin shanshin changed the title [feature] Add Cobertura report Add Cobertura report Oct 27, 2022
@shanshin shanshin added the S: postponed Status: work on the issue is not in the short term plans label Oct 27, 2022
@shanshin shanshin added this to the After stabilization milestone Oct 27, 2022
CLOVIS-AI pushed a commit to CLOVIS-AI/Formulaide that referenced this issue Jan 15, 2023
Exposes the XML code coverage report.

Due to Kotlin/kotlinx-kover#67, it's not yet possible to fully integrate it into GitLab.

See #188

See merge request opensavvy/formulaide!113
@rumax
Copy link

rumax commented Jan 19, 2024

Any update/plans with this feature in 2024?

@rbebb
Copy link

rbebb commented Oct 1, 2024

GitLab now supports JaCoCo coverage reports, but it doesn't appear to populate in the merge request. Has anyone else had this experience?

@IRus
Copy link

IRus commented Oct 1, 2024

GitLab now supports JaCoCo coverage reports, but it doesn't appear to populate in the merge request. Has anyone else had this experience?

Link?

@rbebb
Copy link

rbebb commented Oct 2, 2024

@IRus Here’s the link to GitLab’s docs: https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization/jacoco.html

@guuilp
Copy link

guuilp commented Oct 2, 2024

Just pay attention to this:

Introduced in GitLab 17.3 with a flag named jacoco_coverage_reports. Disabled by default.

@shanshin
Copy link
Collaborator

shanshin commented Jan 3, 2025

This task will be taken into account when migrating to Kotlin Gradle Plugin.

In the future, it will be moved to the Kotlin task tracker, or closed if it loses relevance.

@shanshin shanshin removed this from the After stabilization milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request issue type Implement in KGP
Projects
None yet
Development

No branches or pull requests

8 participants