-
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
Kover breaks mocking OkHttp's Response with MockK #88
Comments
Hi,
|
It's a little weird that this is needed, but excluding OkHttp classes indeed works. |
Another instance where mocking okhttp stuff is broken by kover:
This gives this error:
Even excluding all okhttp classes doesn't resolve this issue (tested on Kover 0.5.0-RC2). |
@shanshin, your recommended workaround isn't working with Kover 0.5.0. After trying different patterns, I switched the coverage engine to JACOCO and it works. The issue seems to be with the Here's all I added to my kover {
coverageEngine.set(kotlinx.kover.api.CoverageEngine.JACOCO)
} Does swapping the coverage engine basically make Kover no more useful than using JACOCO directly? |
@foo4u, in version
|
Thanks for providing a workaround; this is affecting us as well - would love to get to the bottom of it. |
Can confirm this also happens to us with the following config on
Can confirm workaround is still working for
|
There are two ways to avoid this problem:
|
Closed in favor of #418 |
Tested on Kover 0.4.4:
Dependencies:
Tests:
testMockingResponse()
fails here with this stacktrace:This doesn't happen when I don't add Kover as a plugin. Surprisingly enough,
testMockingRequest()
always succeeds, so there's something in in mockingResponse
which goes wrong which doesn't happen when mockingRequest
.The text was updated successfully, but these errors were encountered: