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

Can I generate single report collecting the xml reports already generated? #645

Closed
jpgpuyo opened this issue Jun 25, 2024 · 7 comments
Closed
Assignees
Labels
Question Support request issue type S: in progress Status: implementing or design in process

Comments

@jpgpuyo
Copy link

jpgpuyo commented Jun 25, 2024

Hello,
First of all, thanks for your effort, you are creating an amazing tool :)

Right now, I'm working in a big multimodule project and I am executing unit tests in multiple executions.

So, I would like to know if, once are executions are completed, is it possible to generate single report without executing unit tests again?

Thanks!

@jpgpuyo jpgpuyo added Question Support request issue type S: untriaged Status: issue reported but unprocessed labels Jun 25, 2024
@shanshin
Copy link
Collaborator

Hi,
could you clarify, are you running multiple executions on the same machine?
if yes, then the Gradle build cache is suitable for you, so the tests will not be reruned, and the coverage value will be taken from the cache.

@jpgpuyo
Copy link
Author

jpgpuyo commented Jun 25, 2024

Thanks for your quick response @shanshin
I have 2 use cases:

  • Execute the tests in parallel with github actions. In this case, still trying to find the best solution, as I don't think that I can execute jobs in parallel in the same runner.
  • Execute tests locally in my laptop. In this case, maybe I can use gradle cache.

For solve the issue with github actions, I was thinking about upload all the xml to github artifacts, and then create another task to download all xmls and generate coverage, but not sure if in this case I will take advantage of gradle cache. I will investigate.

If no more solutions can be provided, then you can close this question :)

@shanshin
Copy link
Collaborator

This is a solvable issue, but the solution is not very convenient: there are special tasks called koverBinaryReport or koverBinaryReport<Variant>.

You can generate an HTML or XML report from several binary reports, but for this you need to pass the paths to all sources and all compiled classes. This can be done using the Kover CLI or a special Java dependency: org.jetbrains.kotlinx:kover-features-jvm:0.8.1 and function

@jpgpuyo
Copy link
Author

jpgpuyo commented Jun 25, 2024

Thanks! I will evaluate all the options :)

@shanshin shanshin added S: in progress Status: implementing or design in process and removed S: untriaged Status: issue reported but unprocessed labels Jun 25, 2024
@shanshin
Copy link
Collaborator

Closed as answered.
Feel free to create new issue if you have any additional questions.

shanshin added a commit that referenced this issue Aug 2, 2024
This will allow to build reports on tests run on various machines.

Relates #585
Relates #645
shanshin added a commit that referenced this issue Aug 2, 2024
This will allow to build reports on tests run on various machines.

Relates #585
Relates #645
shanshin added a commit that referenced this issue Aug 7, 2024
This will allow to build reports on tests run on various machines.

Relates #585
Relates #645

Co-authored-by: Leonid Startsev <[email protected]>

PR #663
@shanshin
Copy link
Collaborator

shanshin commented Sep 3, 2024

The ability to use coverage from already generated reports has been added in 0.9.0-RC

@jpgpuyo
Copy link
Author

jpgpuyo commented Sep 4, 2024

Thanks a lot for notifying me @shanshin
Could you provide more information about how to use this new feature?
Thanks!

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: in progress Status: implementing or design in process
Projects
None yet
Development

No branches or pull requests

2 participants