Welcome!
OpenSavvy Prepared helps declare isolated tests quickly with an expressive DSL, that can run on any Kotlin platform.
Let's take a sneak peek
The simplest test is declared as a simple function:
Tests can be organized into suites, which can be nested any number of times:
suite("My test suite") {
test("A first test") { /* … */ }
suite("A nested suite") {
test("A second test") { /* … */ }
test("A third test") { /* … */ }
}
}
Additionally, Prepared exposes many advanced features:
- Isolated test fixtures,
- Time control,
- Background task management¸
- Randomness control,
- Temporary filesystems,
- …and more.
Prepared isn't a test runner
The goal of Prepared is to simplify how we declare tests, how we go from a thought to code. Test runners are libraries that execute test batteries and report results to your build system. Prepared isn't a test runner, but it is compatible with a few existing ones.
Prepared isn't an assertion library
Assertion libraries provide utilities to compare values. Popular choices are Kotlin.test, Kotest Assertions, Strikt, AssertK… just use the one you prefer!
Instead of any specific assertion libraries, we recommend using Power Assert, which is able to generate good error messages from regular Kotlin code, without needing an assertion library at all.
Prepared isn't an IntelliJ plugin (yet?)
Prepared is a simple Kotlin library. It doesn't have a Gradle plugin, nor does it have an IntelliJ plugin. Test are reported by the runner, so your IDE can display the test report. However, IntelliJ doesn't know which lines are tests or not, so it cannot display the small green triangle to select which tests to execute.