Skip to content

kotest/kotest-examples

Repository files navigation

kotest-examples

This repo contains multiple examples of how to use Kotest.

Projects

  • JVM — example of a JVM project
  • Multiplatform — example of a multiplatform project with JVM, JS and Native modules
  • Javscript — example of a JavaScript project
  • Native — example of a native project with Linux, Windows and Mac targets
  • Spring Data JPA — example of a JVM project using Spring Data JPA
  • Spring Webflux — example of a JVM project using Spring Webflux
  • Allure — example of a JVM project using Allure test reporting
  • Wasm — example of a Wasm project
  • Android — example of an Android project
  • Gradle-test-retry — example of a project using the Gradle test retry plugin.

Overriding Kotest Version

All modules support overriding the Kotest version via environment variables. This is useful for CI workflows that need to test against a specific or newly-built Kotest version.

Environment Variables

Variable Description
KOTEST_VERSION Overrides the Kotest library dependencies version
KOTEST_GRADLE_PLUGIN_VERSION Overrides the io.kotest Gradle plugin version

Examples

# Run tests with a specific Kotest library version
cd kotest-jvm
KOTEST_VERSION=6.0.3 ./gradlew test

# Run tests with a specific Gradle plugin version
KOTEST_GRADLE_PLUGIN_VERSION=6.0.3 ./gradlew test

# Override both library and plugin versions (useful when they differ)
KOTEST_VERSION=6.1.0 KOTEST_GRADLE_PLUGIN_VERSION=6.0.3 ./gradlew test

# Or for any other module
cd kotest-multiplatform
KOTEST_VERSION=6.1.0 ./gradlew test

When no override is provided, each module uses the version from its gradle/libs.versions.toml.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8

Languages