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

How to create a total coverage file? #596

Open
abdullahq3102 opened this issue Apr 15, 2024 · 1 comment
Open

How to create a total coverage file? #596

abdullahq3102 opened this issue Apr 15, 2024 · 1 comment
Assignees
Labels
Question Support request issue type S: waiting for clarification Status: additional information required to proceed

Comments

@abdullahq3102
Copy link

Hi I am on version 1.0 of kover and want to aggregate all the coverage into a single html or txt file and not sure how to do that.

I see that they made this PR to create that implementation a couple years ago, but I am not sure about how it works since the readme has been changed a lot since then since the link in that PR's readme change no longer works. The coverage for my system is currently generated like this.

container('gradle') {
  withSonarQubeEnv('Name-Sonar-Cloud') {
    shWithRetryOnGradleException("gradle: Sonarqube analysis", """
    ./gradlew koverXmlReport
    ./gradlew koverHtmlReport
    ./gradlew koverCollectReports
    ./gradlew sonarqube --stacktrace \
      -Dsonar.log.level=TRACE \
      -Dsonar.verbose=true \
      -DenableJacoco=true \
      -Dsonar.branch.name="main" \
      -Dsonar.projectName="android" \
      -Dsonar.coverage.jacoco.htmlReportPaths="${env.WORKSPACE}/build/reports/kover/all/*.html"
      -Dsonar.coverage.jacoco.xmlReportPaths="${env.WORKSPACE}/build/reports/kover/all/*.xml"
      """)
      uploadCodeCoverageToS3()
  }
}

I have tried moving the koverCollectReports that to the beginning but that fails since it requires the html or xml files to exist initially. I think I should be able to use this command to modify the output? I found it the current readme but the workflow is completely different from mine so I am not sure how to add it

coverage-overall - [integer] The overall coverage of the project

@abdullahq3102 abdullahq3102 added Question Support request issue type S: untriaged Status: issue reported but unprocessed labels Apr 15, 2024
@shanshin
Copy link
Collaborator

Hi,
at the moment, there is no version of Kover 1.0 yet.

Could you clarify, have you looked through this documentation?

Without additional information about the project, it is hard to give recommendations, because we need to know the hierarchy of modules in the build, as well as which Kotlin plugin is used in each of them (JVM, multiplatform, Android)

@shanshin shanshin added S: waiting for clarification Status: additional information required to proceed and removed S: untriaged Status: issue reported but unprocessed labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Support request issue type S: waiting for clarification Status: additional information required to proceed
Projects
None yet
Development

No branches or pull requests

2 participants