kmock
0.3.0-rc08indexedSimplifies mocking by automating mock generation for shared source sets, focusing on interfaces. Supports spying and relaxed mocks to minimize boilerplate and enhance testing efficiency.
Simplifies mocking by automating mock generation for shared source sets, focusing on interfaces. Supports spying and relaxed mocks to minimize boilerplate and enhance testing efficiency.
A humble mocking library for Kotlin, KotlinJS and Kotlin Multiplatform using Kotlin Symbol Processing (KSP).
Writing mocks is certainly no witchcraft, but doing them by hand day for day can be dull. More importantly it takes time which can be better invested directly into writing tests. However, while JVM projects get indeed supreme support by either MockK or Mockito, Kotlin Multiplatform still has nothing comparable. KMock aims to fill that gap and will hopefully advance to there over time. Similar to other projects it uses , but it is capable of associating generated Mocks correctly to their belonging shared source sets (like native, ios, etc) without additional setup and with minimal boilerplate done by consumers. KMock works currently based on . It supports to some extent features like spying and relaxation of Mocks to make them non intrusive. So if the project caught your eye check out the or dive into the .
KMock has the following dependencies:
See changelog.
This project uses Semantic Versioning as a guideline for our versioning.
You want to help or share a proposal? You have a specific problem? Read the following:
Please take a look here.
Copyright (c) 2024 Matthias Geisler / All rights reserved.
Please refer to the License for further details.
Surfaced from shared tags and platforms — no rankings paid for.