0Pricing
Kotlin Multiplatform Academy · Lesson

Where Tests Live: commonTest & Friends

Source sets for shared and platform-specific tests.

Tests Get Source Sets Too

Just like your main code, tests live in their own source sets, mirroring commonMain, androidMain and iosMain.

Meet commonTest

commonTest holds tests that run on every platform. Write a test once and verify your shared logic everywhere. ✅

All lessons in this course

  1. The shared Module vs the App Modules
  2. commonMain, androidMain & iosMain
  3. Reading the shared build.gradle.kts
  4. Where Tests Live: commonTest & Friends
← Back to Kotlin Multiplatform Academy