Kotlin / kotlinx-kover

Apache License 2.0
1.31k stars 50 forks source link

Add Cobertura report #67

Open cromefire opened 2 years ago

cromefire commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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

But doesn't support other sourcesets than main yet https://github.com/razvn/jacoco-to-cobertura-gradle-plugin/issues/6

rumax commented 6 months ago

Any update/plans with this feature in 2024?