Skip to content

Execute with Kotestopensavvy.prepared.runner.kotestPreparedSpec

PreparedSpec

abstract class PreparedSpec(body: SuiteDsl.() -> Unit) : StringSpec

Constructors

PreparedSpec

constructor(body: SuiteDsl.() -> Unit)

Properties

assertions

var assertions: AssertionMode?

assertSoftly

blockingTest

concurrency

coroutineDebugProbes

coroutineDispatcherFactory

var coroutineDispatcherFactory: CoroutineDispatcherFactory?

coroutineTestScope

defaultTestConfig

var defaultTestConfig: TestCaseConfig?

dispatcherAffinity

duplicateTestNameMode

var duplicateTestNameMode: DuplicateTestNameMode?

failfast

invocationTimeout

isolationMode

var isolationMode: IsolationMode?

severity

var severity: TestCaseSeverityLevel?

testCoroutineDispatcher

testOrder

var testOrder: TestCaseOrder?

threads

var threads: Int?

timeout

var timeout: Long?

Functions

add

open override fun add(test: RootTest)

afterAny

fun afterAny(f: suspend (Tuple2<TestCase, TestResult>) -> Unit)
open suspend fun afterAny(testCase: TestCase, result: TestResult)

afterContainer

fun afterContainer(f: suspend (Tuple2<TestCase, TestResult>) -> Unit)
open suspend fun afterContainer(testCase: TestCase, result: TestResult)

afterEach

fun afterEach(f: suspend (Tuple2<TestCase, TestResult>) -> Unit)
open suspend fun afterEach(testCase: TestCase, result: TestResult)

afterInvocation

fun afterInvocation(f: suspend (TestCase, Int) -> Unit)

afterProject

fun afterProject(f: AfterProject)

afterSpec

open suspend fun afterSpec(spec: Spec)
open override fun afterSpec(f: suspend (Spec) -> Unit)

afterTest

open override fun afterTest(f: suspend (Tuple2<TestCase, TestResult>) -> Unit)
open suspend fun afterTest(testCase: TestCase, result: TestResult)

appliedTags

fun appliedTags(): Set<Tag>

aroundSpec

fun aroundSpec(aroundSpecFn: suspend (Tuple2<KClass<out Spec>, suspend () -> Unit>) -> Unit)

aroundTest

fun aroundTest(aroundTestFn: suspend (Tuple2<TestCase, suspend (TestCase) -> TestResult>) -> TestResult)

assertionMode

open fun assertionMode(): AssertionMode?

autoClose

fun <T : AutoCloseable> autoClose(closeable: T): T
fun <T : AutoCloseable> autoClose(closeable: Lazy<T>): Lazy<T>

beforeAny

fun beforeAny(f: suspend (TestCase) -> Unit)
open suspend fun beforeAny(testCase: TestCase)

beforeContainer

fun beforeContainer(f: suspend (TestCase) -> Unit)
open suspend fun beforeContainer(testCase: TestCase)

beforeEach

fun beforeEach(f: suspend (TestCase) -> Unit)
open suspend fun beforeEach(testCase: TestCase)

beforeInvocation

fun beforeInvocation(f: suspend (TestCase, Int) -> Unit)

beforeSpec

fun beforeSpec(f: suspend (Spec) -> Unit)
open suspend fun beforeSpec(spec: Spec)

beforeTest

open suspend fun beforeTest(testCase: TestCase)
open override fun beforeTest(f: suspend (TestCase) -> Unit)

concurrency

open fun concurrency(): Int?

config

open fun String.config(enabled: Boolean?, invocations: Int?, threads: Int?, tags: Set<Tag>?, timeout: Duration?, extensions: List<TestCaseExtension>?, enabledIf: EnabledIf?, invocationTimeout: Duration?, severity: TestCaseSeverityLevel?, enabledOrReasonIf: EnabledOrReasonIf?, coroutineDebugProbes: Boolean?, blockingTest: Boolean?, test: suspend TestScope.() -> Unit)

coroutineDispatcherFactory

open fun coroutineDispatcherFactory(): CoroutineDispatcherFactory?

defaultTestCaseConfig

open fun defaultTestCaseConfig(): TestCaseConfig?

dispatcherAffinity

extension

fun <T : Extension> extension(extension: T): T
fun extension(f: suspend (Tuple2<TestCase, suspend (TestCase) -> TestResult>) -> TestResult)

extensions

fun extensions(vararg extensions: Extension)
fun extensions(extensions: List<Extension>)
open fun extensions(): List<Extension>

finalizeSpec

fun finalizeSpec(f: suspend (Tuple2<KClass<out Spec>, Map<TestCase, TestResult>>) -> Unit)

globalExtensions

open override fun globalExtensions(): List<Extension>

include

fun include(factory: TestFactory)
fun include(prefix: String, factory: TestFactory)

invocationTimeout

open fun invocationTimeout(): Long?

invoke

open operator fun String.invoke(test: suspend StringSpecScope.() -> Unit)

isolationMode

open fun isolationMode(): IsolationMode?

listener

fun <T : TestListener> listener(listener: T): T

listeners

fun listeners(vararg listeners: TestListener)
fun listeners(listeners: List<TestListener>)
open fun listeners(): List<TestListener>

preparedSuite

fun RootScope.preparedSuite(config: TestConfig = TestConfig.Empty, block: SuiteDsl.() -> Unit)

Executes a Prepared SuiteDsl in a Kotest suite.

prependExtension

fun prependExtension(extension: Extension)

prependExtensions

fun prependExtensions(extensions: List<Extension>)

register

fun <T : TestListener> register(extension: T): T
fun register(vararg extensions: Extension)
fun register(extensions: List<Extension>)

registeredAutoCloseables

fun registeredAutoCloseables(): List<Lazy<AutoCloseable>>

registeredExtensions

fun registeredExtensions(): List<Extension>

rootTests

open override fun rootTests(): List<RootTest>

seal

fun seal()

setParentConfiguration

fun setParentConfiguration(configuration: TestConfiguration)

tags

open override fun tags(vararg tags: Tag)
open fun tags(): Set<Tag>

testCaseOrder

open fun testCaseOrder(): TestCaseOrder?

threads

open fun threads(): Int?

timeout

open fun timeout(): Long?