suite
abstract fun suite(name: String, config: TestConfig = TestConfig.Empty, block: SuiteDsl.() -> Unit)(source)
Creates a child suite named name of the current suite.
Simple example
suite("An example") {
test("A test") { … }
suite("A nested suite") {
test("A nested test 1") { … }
test("A nested test 2") { … }
}
}
Content copied to clipboard
Test configuration
The default configuration for all tests can be passed with the config parameter:
suite("An example", CoroutineTimeout(2.minutes) + Tag("slow")) {
…
}
Content copied to clipboard
To learn more about the available configuration options, see the subtypes of TestConfig.Element.