Kotlin Assertions

Open-source Kotlin projects categorized as Assertions

Top 7 Kotlin Assertion Projects

  • Kotest

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

    Project mention: Best practices for Unit Testing Android Apps with Mockk, Kotest and others | dev.to | 2023-05-10

    As a matter of fact, in the previous examples, we have shifted a bit away from the TDD standards in the meaning that we test not only the operability of our code, but rather check if the code runs according to certain specifications (Given/When/Then). These specifications are our tests, and the syntactic sugar in the form of the possibility to give clear names to the tests using DisplayName and the grouping of the tests by a set of similar attributes helps us clearly formulate these specifications. There is an entire family of frameworks in different languages that allow us to create such specifications: for Java it is Spock, for Ruby—RSpec, and for Kotlin—Spek and Kotest frameworks. Below, I will go into more detail about them.

  • strikt

    An assertion library for Kotlin

    Project mention: Kotlin assertion libraries - JUnit, Hamkrest and Strikt | /r/Kotlin | 2023-01-06

    In this episode we first look at improving our use of JUnit, using kotlin.test to improve type safety, and assertAll to make multiple checks on the same subject. Then we look at Hamkrest (https://github.com/npryce/hamkrest), a Kotlin reimplementation of the classic Hamcrest, before settingly on Strikt (https://strikt.io/) for our fluent assertions.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support. Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • kotlin-power-assert

    Kotlin compiler plugin to enable diagrammed function calls in the Kotlin programming language

    Project mention: Kotlin assertion libraries - JUnit, Hamkrest and Strikt | /r/Kotlin | 2023-01-06

    I’m getting recommendations a compiler plug-in that also looks very interesting https://github.com/bnorm/kotlin-power-assert

  • atrium

    A multiplatform assertion library for Kotlin

  • hamkrest

    Hamcrest for Kotlin

    Project mention: Kotlin assertion libraries - JUnit, Hamkrest and Strikt | /r/Kotlin | 2023-01-06

    In this episode we first look at improving our use of JUnit, using kotlin.test to improve type safety, and assertAll to make multiple checks on the same subject. Then we look at Hamkrest (https://github.com/npryce/hamkrest), a Kotlin reimplementation of the classic Hamcrest, before settingly on Strikt (https://strikt.io/) for our fluent assertions.

  • expekt

    BDD assertion library for Kotlin

  • kiwi

    Fluent assertions for Kotlin (by from-source)

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-05-10.

Kotlin Assertions related posts

Index

What are some of the best open-source Assertion projects in Kotlin? This list will help you:

Project Stars
1 Kotest 3,949
2 strikt 493
3 kotlin-power-assert 485
4 atrium 466
5 hamkrest 340
6 expekt 172
7 kiwi 17
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
www.sonarlint.org