KotlinTest Testing Framework


Qualified supports writing test fixtures for Kotlin using KotlinTest.

Quick Start

Solution Code

fun add(a: Int, b: Int) = a + b

Test Fixture:

import io.kotlintest.matchers.shouldBe
import io.kotlintest.specs.StringSpec

class TestAdd : StringSpec() {
    init {
        "add(1, 1) should return 2" {
            add(1, 1) shouldBe 2

Assertion Libraries

Following assertion libraries can be used:

Learn More

You can learn more on the KotlinTest website.