First steps
-
Add the TestBalloon Gradle plugin to your build script:
Info
TestBalloon releases come as a set, with matching variants for specific Kotlin versions. Please look up the
$testBalloonVersionmatching your Kotlin version in the CHANGELOG. -
Add a dependency for the TestBalloon framework core library:
Info
The repository contains a Multiplatform configuration example.
-
Add extra dependencies for Android (optional):
named("androidHostTest") { // (1)! dependencies { implementation("de.infix.testBalloon:testBalloon-framework-core:$testBalloonVersion") implementation("junit:junit:$junit4Version") } }- Using the
com.android.kotlin.multiplatform.libraryplugin.
named("androidDeviceTest") { // (1)! dependencies { implementation("de.infix.testBalloon:testBalloon-framework-core:$testBalloonVersion") implementation("androidx.test:runner:$androidxRunnerVersion") } }- Using the
com.android.kotlin.multiplatform.libraryplugin.
Info
The repository contains configuration examples for Android and Multiplatform library with Android.
- Using the
-
Add a dependency for the assertion library of your choice:
Info
The above is for a Kotlin Multiplatform test source set. For Kotlin JVM or Android, use
testImplementation(...)orandroidTestImplementation(...)as usual. -
Write a test:
-
Run tests via the familiar Gradle test tasks.
-
Install the TestBalloon plugin for IntelliJ IDEA from the JetBrains Marketplace to run individual tests or test suites via the editor’s gutter icons.