Kotest Framework

An introduction to Kotlin testing frameworks.

Kotest Overview

An introduction to Kotlin’s testing framework.

Kotest Project Setup

Kotest is a powerful testing framework written in Kotlin. This page explains how to set up a project.

Writing Basic Kotest Tests

Explains basic Kotest test writing, test execution, and reports.

Kotest Testing Styles

Kotest provides a variety of testing styles. This page explains the supported testing styles and how to use them.

Kotest Conditional Evaluation

There are several ways to disable tests. You can hard-code it in the test or disable tests conditionally at runtime.

Kotest Isolation Modes

Isolation Modes control how the test engine creates spec instances for test cases. In other words, they determine how test instances are created for each test case.

Kotest Lifecycle Hooks

When writing effective test code, it is important to manage the lifecycle of each test case. This page explains how to use lifecycle hooks.

Kotest Basic Extensions

Kotest Extensions are extension features that provide various capabilities which can be integrated into the test lifecycle of the Kotest test execution framework.

Kotest Coroutines

This page explains how to test coroutines in Kotest.

Kotest Testing Exceptions

This page explains exception testing in Kotest.

Kotest Data-Driven Testing

For effective testing, creating, managing, and cleaning up test data is important. This section looks at how to manage test data with Kotest.

Kotest Non-deterministic Testing

Non-deterministic Testing can help verify software integrity. For example, it can effectively test software systems that include random or unpredictable elements such as parallel processes, external network calls, and access to various system resources.

Kotest Integrations

You can write more robust, higher-quality tests by using Kotest together with the mocking framework mockk and JaCoCo. This page explains mockk, which helps with test isolation and dependency management, and JaCoCo, a code coverage tool that measures how much of a codebase is tested.

Kotest Test Ordering

Ordering in Kotest is a feature for controlling the order of test execution. It is useful when you want to run tests in a specific order or filter and run tests according to specific conditions.

Grouping Kotest Tests with Tags

For effective software testing, writing and managing test cases is important. This section looks at how to write test cases with Kotest.

Kotest Resources

This page explains how to automatically close resources in Kotest and how to temporarily create files and directories needed for tests.

Kotest Configuration

Kotest Configuration is used to customize and control test execution behavior. It provides many configuration options so users can adjust the test environment as needed.

Kotest Test Factories

Sometimes you may want to write a common set of tests and reuse it for specific inputs. In Kotest, you can do this with test factories, which generate tests that can be included in one or more specs.

Kotest Test Output

This page explains how to output Kotest test results.

Kotest Timeouts

This page explains how to test with invocation time limits.

Kotest Other Settings

This page explains how to fail fast in Kotest, how to fail on an empty test suite, and other settings.