Kotest + MockK = java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
See original GitHub issuehttps://github.com/mockk/mockk/issues/467 https://github.com/mockk/mockk/issues/459
testImplementation 'io.kotest:kotest-runner-junit5-jvm:4.1.0' // for kotest framework
testImplementation 'io.kotest:kotest-assertions-core-jvm:4.1.0' // for kotest core jvm assertions
testImplementation 'io.kotest:kotest-property-jvm:4.1.0' // for kotest property test
testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.0' //for gutter |> icons w/ kotest plugin
Just wanted to put these on your radar in case the issue is with Kotest and not MockK.
I can run the tests fine using ./gradlew test ..., but when I run using the Kotest plugin via Android Studio’s gutter icons, the above issues happen. Can’t test with the newest version because of https://github.com/kotest/kotest/issues/1601
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
io/mockk/proxy/MockKAgentFactory java.lang ... - GitHub
Prerequisites I am running the latest version I checked the documentation and found no answer I checked to make sure that this issue...
Read more >Mockk spky throwing NoClassDefFoundError - Stack Overflow
It seems the change relates to Kotlin and was made at version 1.5. The change, KT-44912, relates to how the Kotlin compiler generates ......
Read more >MockK: A Mocking Library for Kotlin - Baeldung
Here comes the MockK library, which offers support for Kotlin language features and constructs. MockK builds proxies for mocked classes. This ...
Read more >MockK | mocking library for Kotlin
Provides DSL to mock behavior. Built from zero to fit Kotlin language. Supports named parameters, object mocks, coroutines and extension function mocking.
Read more >System Extensions - Kotest
With Kotest System Extensions, these difficulties are made easy to mock and simulate, and your code can be tested correctly. After changing the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This seems to still be an issue for me
I think so too. Running tests without kotest plugin, with gradle test task works fine.