{"repo":"mockk/mockk","free":true,"listed":false,"github":"https://github.com/mockk/mockk","clone":"git clone https://github.com/mockk/mockk.git","description":"mocking library for Kotlin","language":"Kotlin","stars":5758,"topics":["verification","chain-calls","matcher","argument-matchers","kotlin","mocking-framework","mock","testing","tdd","hacktoberfest"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"Getting started All you need to get started is just to add a dependency to MockK library. Gradle/Maven dependency Approach Instruction testImplementation \"io.mockk:mockk-jvm:${mockkVersion}\" (Kotlin DSL) testImplementation(\"io.mockk:mockk-jvm:${mockkVersion}\") &lt;dependency&gt; &lt;groupId&gt;io.mockk&lt;/groupId&gt; &lt;artifactId&gt;mockk-jvm&lt;/artifactId&gt; &lt;version&gt;${mockkVersion}&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; Unit testImplementation \"io.mockk:mockk-android:${mockkVersion}\" testImplementation \"io.mockk:mockk-agent:${mockkVersion}\" Instrumented androidTestImplementation \"io.mockk:mockk-android:${mockkVersion}\" androidTestImplementation \"io.mockk:mockk-agent:${mockkVersion}\" DSL examples Simplest example. By default mocks are strict, so you need to provide some behaviour. See the \"Features\" section below for more detailed examples. BDD style (optional) For teams using Behavior-Driven Development, MockK provides BDD-style aliases BDD aliases Standard MockK BDD style ---------------- ----------- every { ... } given { ... } coEvery { ... } coGiven { ... } verify { ... } then { ... } coVerify { ... } coThen { ... } Spring support springmockk introduced in official Spring Boot Kotlin tutorial Quarkus support quarkus-mockk adds support for mocking beans in Quarkus. Documentation can be found here Kotlin version support From version 1.13.0 MockK supports Kotlin 1.4 and higher Known issues PowerMock needs a workaround to run together ","default_branch":null,"files":null,"tree":[],"storefront":"/r/mockk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mockk/mockk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}