-
Notifications
You must be signed in to change notification settings - Fork 52
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
Separate Kover report for Integration tests #732
Comments
Hi, Are directories
placed in different source sets? If so, you could create additional report variants, each for a specific source set.
Thus, the |
Hello 🙋♂️ I believe I need the same thing as @tembi4, let me phrase it in my words. My source sets are:
I'd like to be able to run the following tasks and receive their corresponding outputs:
@shanshin I don't think your suggestion works for me as what it does is to denote the sources that should have their coverage verified. What I need is to include or exclude tests that are used to generate coverage information. I thought I could achieve this by using variants and instrumentation. The following configuration sample works for the kover {
useJacoco()
currentProject {
sources {
includedSourceSets.addAll("main")
}
instrumentation {
disabledForTestTasks.add("integration")
}
}
}
I've tried the following, but configuring instrumentation per variant isn't possible: kover {
useJacoco()
currentProject {
sources {
includedSourceSets.addAll("main")
}
createVariant("unit") {
instrumentation { // 'fun instrumentation(block: Action<KoverProjectInstrumentation>): Unit' can't be called in this context by implicit receiver. Use the explicit one if necessary
disabledForTestTasks.add("integration")
}
}
}
} |
Indeed, unfortunately, it will not be possible to create such a configuration now, the approach described by me only works when you generate all reports in one run, or when you explicitly disable an unnecessary task (like |
Thank you, Sergey! |
We're migrating from Java to Kotlin and from JaCoCo to Kover. The structure of source folders:
my_project:
I use
test
to run unit tests andintegrationTest
task to execution only tests fromintegrationTestSrc
.How can I create a separate tasks for unit test coverage and integration? I need to run the integration tests in pipeline only after the unit test coverage verification is passed.
Currently (I just simply added the Kover), when I run
koverHtmlReport
it runsintegrationTest
(probably because it's of type Test?) and unit tests and somehow merge results where:So, I need, basically, run unit tests, generate/verify , after this run integration test and generateReport/verifyRules only for what is covered by Int tests.
Thanks in advance!
The text was updated successfully, but these errors were encountered: