You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Kover shows zero coverage for a public extension method.
Errors
Kover shows a different coverage than Android Studio's "Run with Coverage".
Expected behavior
Kover should show the same coverage as Android Studio's "Run with Coverage".
Reproducer
// src/main/kotlin/<package>/SampleExtensions.kt
// interesting: displayed as "SampleExtensionsKt" in Kover's HTML report
fun Sample.doSomethingInExtension() { ... } // Kover: 0% coverage
// src/main/kotlin/<package>/SampleViewModel.kt
// displayed as "SampleViewModel" in Kover's HTML report
class SampleViewModel {
fun doSomethingInViewModel() {
Sample().doSomethingInExtension() // Kover: 100% coverage
}
}
// src/test/kotlin/<package>/SampleViewModelSpec
class SampleViewModelSpec : io.kotest.core.spec.style.WordSpec() {
init {
"SampleViewModel" should {
"call extension" {
SampleViewModel().doSomethingInViewModel()
}
}
}
}
Please excuse my late response, as we have not been able to examine this issue furthermore until now.
Now that we have, we realized that this issue is directly linked to #599. The missing code coverage has nothing to do with the extension itself but with the fact that its test is located in another module. Generating a total report with Kover 0.8.0 produces the expected code coverage.
Therefore I will close this issue and thank you again for your help.
Describe the bug
Kover shows zero coverage for a public extension method.
Errors
Kover shows a different coverage than Android Studio's "Run with Coverage".
Expected behavior
Kover should show the same coverage as Android Studio's "Run with Coverage".
Reproducer
Environment
The text was updated successfully, but these errors were encountered: