Execute with TestBalloon

Execute Prepared tests with the TestBalloon framework.

Configuration

Add the TestBalloon Gradle plugin and a dependency on this library:

plugins {
kotlin("multiplatform")
id("de.infix.testBalloon") version "VERSION" //(1)
}

kotlin {
// …

sourceSets.commonTest.dependencies {
implementation("dev.opensavvy.prepared:runner-testballoon:VERSION") //(2)
}
}
  1. List of TestBalloon versions

  2. List of Prepared versions

Usage

To declare a Prepared suite using the TestBalloon runner, simply declare a top-level variable initialized using the preparedSuite helper:

val MyTestSuite by preparedSuite {
test("Hello world!") {
assert(3 == 3)
}

suite("My suite") {
test("First") { /* … */ }
test("Second") { /* … */ }
}
}

If you are already using TestBalloon and want to use Prepared features within an existing suite, use the withPrepared helper:

val MyMixedTestSuite by testSuite {
// Here, we're using TestBalloon syntax
test("Foo") { /* … */ }
testSuite("Bar") { /* … */ }

withPrepared {
// Here, we're using Prepared syntax
test("Foo") { /* … */ }
suite("Bar") { /* … */ }
}
}

Packages

Link copied to clipboard
common