-
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
Unit tests fail after kover is added to project #730
Comments
Hi, Don't you have a small production project? Due to this error, it is difficult to understand which instrumentation class is causing the error. |
Full stacktrace:
It's really odd, because it only fails when running via CLI. Also, when doing sequential tests it only fails the first run (then it fails again after a |
Is your project multi-module? You may limit instrumented classes in all projects. kover {
currentProject {
instrumentation {
excludedClasses.add("io.mockk.*")
}
}
} If it doesn't help, try to instrument the classes of your application only. To do this, specify the largest package in which all your classes are exactly located (in include filter) kover {
currentProject {
instrumentation {
includedClasses.add("com.myapplication.*")
}
}
} |
Yes, multi-module. None of the solutions worked, unfortunately. However, I was able to solve it by replacing Sorry for the mess, I believe we can now close this. |
OK, but please reopen the issue if you create a small stable reproducer. |
Describe the bug
After adding
kover
to the project, unit tests started failing for unexpected reasons. The issue seems related toMockK
, however it isn't clear what is causing it, and it only happens oncekover
is integrated.Errors
Expected behavior
Tests shouldn't fail, as it was happening prior to introducing
kover
.Reproducer
Only happens in test classes, when
unmockkAll()
is called.Reports
Environment
The text was updated successfully, but these errors were encountered: