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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
commonTest should be skipped #245
Comments
Hi, |
@shanshin yeap exactly, it is done automatically for android apps/libraries for Note: Even though it can be super edge case, there are also |
At the moment, there is no way to disable the use of tests from a specific source set. |
@mustafaozhan, I would also like to clarify, the classes from |
Hello @shanshin thank you for your answers!
Unfortunately, this will require different setup for each module maybe we need a more general workaround, I tried adding below code into root koverMerged {
enable()
filters {
classes {
excludes += listOf(
"*Test",
"*.*Test",
"*.*.*Test",
"*.*.*.*Test",
"*.*.*.*.*Test"
)
}
}
}
Yes I can see these classes both in xml and html reports. |
This is definitely a bug, classes from test source sets should not get into the report. |
I have the same issue. android {
testOptions {
unitTests {
isReturnDefaultValues = true
all {
if (it.name == "testDebugUnitTest") {
it.extensions.configure<kotlinx.kover.api.KoverTaskExtension>() {
isDisabled.set(false)
excludes.addAll(
"hilt_aggregated_deps.*",
"io.mockative.*"
)
}
}
}
}
}
} |
Fixed in |
Hello 馃憢
Currently kover calculates the coverages for the test classes in
commonTest
in Kotlin Multiplatform projects. It should skip the test folders. If it is not possible we should have option to exclude files bydirectory
currently only package option is available.In Android module
test
folder is already skipped, we should have the same behavior for KMP projects forcommonTest
folder. It causes unfair coverage increase.The text was updated successfully, but these errors were encountered: