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
Is there a way to make kover to create a coverage report based only on existing coverage data? #192
Comments
Hi,
not really. If you have applied the Kover plugin to the project, then all tasks with the
For your example you may write
in this case, when running
You may also disable unnecessary tests when running Gradle (if there are not very many of them). |
ok, so excluding the test task with the |
|
Consider if I first ran the test task, which would run all tests and (i think) will also generate a coverage data file. I am trying this out locally at the moment, and will update this thread with what happens once everything is done. |
No, coverage data for all ignored tests won't be used in the report. |
You can use the build cache to avoid re-running tests that haven't changed. In this case, the binary reports will be taken from the cache, and only the modified tests will be run. See Gradle docs |
Good to know, I'll try that |
Ok, after letting tests run, and running kover while excludign the test task, it seems like coverage is actually considered, and I have a full report available. |
When I iterate on my code, I find myself making some changes, running specific tests, then checkign coverage by generating a jacoco html report with the data from the executed tests alone.
When I installed kover, I added the following to my build script:
If I understand correctly, this code is what makes the test task implicitly run when a task such as koverHtmlReport is run.
I would like to disable this behavior, and instead allow kover to use only what coverage it finds. If there is no coverage binary created, I expect there to be no coverage reported. If coverage was generated only for a few methods of a few classes, I expect there to be correct coverage data for those methods/classes alone, anything else can be garbage data as far as I am concerned.
This is possible in JaCoCo, as I can simply run the jacocoTestReport task independently. Is this also possible with Kover, and if so, is there some documentation on it? if not, please consider supporting this use case, as it is helpful when one does not want to waste time waiting for many time consuming tests to run when they only want to test a portion of functionality.
The text was updated successfully, but these errors were encountered: