mockk VS spek

Compare mockk vs spek and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
mockk spek
17 2
5,284 2,222
0.4% -0.2%
8.5 0.0
22 days ago 5 months ago
Kotlin Kotlin
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

mockk

Posts with mentions or reviews of mockk. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-23.

spek

Posts with mentions or reviews of spek. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-22.
  • Evolution of unit tests in Android
    3 projects | dev.to | 22 Oct 2023
    Spek is a unit testing framework for Kotlin which supports Specification and Gherkin style.
  • Best practices for Unit Testing Android Apps with Mockk, Kotest and others
    5 projects | dev.to | 10 May 2023
    The describe-it style is mainly used to write Spek tests. describe structure allows us to create a group of tests describing a specific method, and, in it, a specific scenario for the method is written. But it is also possible to use the GivenWhenThen style. Unfortunately, the framework doesn’t have embedded coroutine support, so we have to always use runBlockingTest { } for suspended functions. There is a ticket with this feature request on Github, but it seems it was never completed.

What are some alternatives?

When comparing mockk and spek you can also consider the following projects:

mockito-kotlin - Using Mockito with Kotlin

Kotest - Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing

expekt - BDD assertion library for Kotlin

mock-fuel - JUnit 5 extension to easily test with the http client Fuel for Kotlin

Kluent - Fluent Assertion-Library for Kotlin

aspen - Aspen is a simple test runner for Kotlin that allows you to write tests using your own DSL.

kotlin-logging - Lightweight Multiplatform logging framework for Kotlin. A convenient and performant logging facade.

balin - Balin is an automation library for Kotlin. It's basically a Selenium-WebDriver wrapper inspired by Geb.

kotlinfixture - Fixtures for Kotlin providing generated values for unit testing

kspec - Kotlin Specification Framework