ページ内ナビ
概要
KotestはKotlin向けのtesting frameworkで、複数のspec style、豊富なmatcher、property testing、data-driven testを一つのecosystemで提供します。JVMではJUnit Platformと統合し、Kotlin/JS・Native・Wasmを含むMultiplatform向け構成も用意されています。
特徴と向いている用途
公式資料に基づく紹介・実機未検証 · 内容確認日:
主な特徴
複数のspec styleとmatcherでKotlinらしいtestを記述する
FunSpecやStringSpec等のspec styleを選び、shouldBe等のmatcherでassertionを記述できます。test structureとassertionを同じlibrary群で揃えられます。
property testingとMultiplatformへ同じecosystemを広げる
kotest-propertyを追加するとgeneratorとshrinkingを使ったproperty testingができ、JS・Native・Wasm向けにはframework engineとKSP/Gradle pluginを組み合わせます。
出典:[3]
向いている用途
導入前の確認
参考にした公式資料
- [1]kotest/kotest repository(2026-09-30)
- [2]Kotest README(2026-09-30)
- [3]Kotest 6.2.5 setup reference(2026-09-30)
- [4]Kotest v6.2.5 release(2026-09-30)
- [5]Kotest Apache 2.0 license(2026-09-30)
編集部からの補足
Kotest 6.2.5はKotlin向けの総合testing frameworkです。JVMではJUnit Platform runnerとassertionを組み合わせ、必要に応じてproperty testingを追加できます。6.xはKotlin 2.2以上・JDK 11以上・Gradle 8以上が基準なので、既存projectのtoolchain確認が先です。
3ステップで試す
- 1
Kotest 6.2.5のrunnerとassertionを追加
JVM projectへrunnerとmatcherを同じversionで追加し、Gradle test taskではuseJUnitPlatform()を有効にします。
testImplementation("io.kotest:kotest-runner-junit5:6.2.5") testImplementation("io.kotest:kotest-assertions-core:6.2.5") - 2
StringSpecを1件作成
io.kotest.core.spec.style.StringSpecとio.kotest.matchers.shouldBeをimportして最小testを作ります。
class MathTest : StringSpec({ "1 + 1" { 1 + 1 shouldBe 2 } }) - 3
test taskを実行
JUnit Platform経由でKotest specが検出・実行されることを確認します。
./gradlew test
成長
成長の推移 · 直近30日
4,789 Stars
推移データを蓄積中です。
Built with
カテゴリとタグ
GitHubデータ
GitHubのデータGitHubの詳細データを見る
GitHub Topics
- assertions
- kotlin
- kotlin-js
- kotlin-multiplatform
- matchers
- multiplatform
- property-testing
- test
- testing
- testing-tools
- Stars
- 4,789
- Forks
- 703
- Watchers
- 51
- Open Issues
- 49
- 所有者種別
- Organization
- 主要言語
- Kotlin
- ライセンス
- Apache-2.0
- リポジトリ最終更新
- 2026/09/28
関連情報
関連記事を投稿するこのOSSの使い方や活用事例をMarkdownで投稿できます。管理者が承認した後に公開されます。
あわせて探訪
- Exposed9,291 Stars
共通タグ 1件 · 共通カテゴリ 1件 · 同じ言語
Kotlinからtype-safe SQL DSLまたはDAOを選び、JDBC/R2DBC・migration・Spring連携までmodule単位で構成する
Kotlin - Aider49,251 Stars
共通タグ 1件 · 共通カテゴリ 1件
リポジトリー全体の文脈を使ってターミナルからコードを編集する
Python - Gradle18,864 Stars
共通タグ 1件 · 共通カテゴリ 1件
multi-projectのbuild・test・dependency管理をtask graphとpluginで統合する
Groovy - MockK5,760 Stars
共通タグ 3件 · 共通カテゴリ 2件 · 同じ言語
mock・stub・verifyをKotlin DSLで記述し、coroutineやAndroid testへ広げる
Kotlin - Jest45,464 Stars
共通タグ 2件 · 共通カテゴリ 2件
assertion・mock・watch・snapshot・worker isolationを一つのCLIへまとめるJavaScript testing framework
TypeScript - Vitest17,175 Stars
共通タグ 2件 · 共通カテゴリ 2件
Viteのtransform/configを共有しNode・DOM・Browser Modeを一つのtest frameworkで扱う
TypeScript
情報の誤りを報告
掲載内容に誤りや古い情報があればお知らせください。