MockK
MockK: A focused Kotlin mocking toolkit with strong coroutine and verification support. Ranked #31 of 32 in Unit Testing Frameworks by our editors (6.0/10); pricing: Open source; best for kotlin teams needing advanced mocking.
At a glance
- Editor score6.0 / 10
- PricingOpen source
- Best forKotlin teams needing advanced mocking
- Paid fromFree
- Supported languagesKotlin
- Facts checked21 Sep 2026

Where it wins
- Mocks classes, objects, constructors, statics, extensions, and coroutines
- Supports JUnit 4, JUnit 5, Gradle, Maven, Spring, and Quarkus
- Provides verification, ordering, timeouts, injection, spies, and argument capture
Where it doesn't
- Focused on mocking rather than standalone test orchestration
- Supported language is Kotlin
- Broader test workflows still depend on its test-framework integrations
Our verdict on MockK
MockK is an open-source Kotlin mocking library for JVM and Android tests. It is designed for Kotlin teams that need to create mocks, stub behavior, verify calls, spy on real objects, and test coroutine-based code. Its Kotlin-focused DSL covers class, object, constructor, static, top-level, and extension-function mocking, while annotations support mock initialization and dependency injection. It supports regular unit tests and Android instrumented tests, making it relevant to Android development as well as JVM-based Kotlin projects.
Mocking depth is MockK’s main strength. Teams can combine argument matchers and argument capturing with call verification, ordering, confirmation, and timeouts. Coroutine mocking and verification are included, alongside restricted mocking configuration and partial mocking through spies. These capabilities make MockK a strong fit when tests need detailed control over collaborators, object behavior, constructors, or asynchronous Kotlin code. JUnit 4 and JUnit 5 integrations help connect that mocking layer to established test suites, while Gradle and Maven integrations fit common Kotlin build workflows.
The product’s scope is deliberately narrower than a complete unit-test orchestration system. MockK supplies extensive mocking and verification, but its role is not to replace a standalone test runner. Kotlin teams should choose it when advanced mocking is the priority, particularly for coroutine-heavy or Android-oriented tests. Teams seeking a broader testing system beyond mocking should pair it with appropriate test-framework tooling rather than treat MockK as the entire test workflow.
Your product? Our editors can test MockK in depth and publish a review, labelled as paid · from $149/mo →
MockK pricing
MockK fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | Free |
| Supported languages | Kotlin |
| Built-in mocks | Yes |
| Parameterized cases | Not verified |
| Parallel execution | Yes |
| Snapshot testing | Not verified |
| Property-based checks | Not verified |
| Deployment | Mobile |
| Platforms | Android |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 6 integrations: JUnit 4, JUnit 5, Android, Spring, Quarkus, Kotlin coroutines |
| Pricing | Open source |
| Website | mockk.io |
| Facts checked | 21 Sep 2026 |
MockK integrations
MockK lists 6 integrations on its own site.
- JUnit 4
- JUnit 5
- Android
- Spring
- Quarkus
- Kotlin coroutines
Alternatives to MockK
- pytestA free, full-featured Python testing framework with fixtures, plugins, and parametrization.9.4
- GoogleTestA strong free choice for C++ teams that need mocks, parameterized tests, and parallel options.9.2
- JUnitAn open-source Java and JVM framework with broad tooling support and flexible test models.9.1
Used MockK? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used MockK for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
MockK is listed in our Unit Testing Frameworks directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/mockk/"><img src="https://www.itechguides.com/best/badge/mockk.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update

