Skip to content
/ kmock Public

A humble mocking library for Kotlin, KotlinJS and Kotlin Multiplatform using Kotlin Symbol Processing (KSP).

License

Notifications You must be signed in to change notification settings

bitPogo/kmock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KMock

A humble mocking library for Kotlin, KotlinJS and Kotlin Multiplatform using Kotlin Symbol Processing (KSP).

Explore the docs »

Report Bug · Request Feature

Latest release Latest Version Platform License

Table Of Contents

About The Project

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, KMP still has nothing comparable.
KMock aims to at least automate the process of Mock generation and will hopefully advance from here. Similar to other projects it uses KSP, 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 only based on interfaces. 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 Playground or dive into the Starter Guide.

Additional Requirements

  • Android 6.0 (API 23) to Android 12 (API 31)

  • Java 11

Changelog

See changelog

Versioning

This project uses Semantic Versioning as a guideline for our versioning.

Releases use this format: {major}.{minor}.{patch}

  • Breaking changes bump {major} and reset {minor} & {patch}

  • Backward compatible changes bump {minor} and reset {patch}

  • Bug fixes bump {patch}

Contributing

You want to help or share a proposal? You have a specific problem? Read the following:

Copyright (c) 2022 Matthias Geisler / All rights reserved.

Please refer to our License for further details.