AfterProject |
typealias AfterProject = () -> Unit |
AfterSpec |
typealias AfterSpec = (Spec) -> Unit |
AfterTest |
typealias AfterTest = suspend (Tuple2<TestCase, TestResult>) -> Unit |
AroundTestFn |
typealias AroundTestFn = suspend (TestCase, suspend (TestCase) -> TestResult) -> TestResult |
AutoCloseable |
interface AutoCloseable |
BeforeSpec |
typealias BeforeSpec = (Spec) -> Unit |
BeforeTest |
typealias BeforeTest = suspend (TestCase) -> Unit |
CompositeSpec |
abstract class CompositeSpec : Spec |
FailureFirstSpecExecutionOrder |
An implementation of SpecExecutionOrder which will run specs that contained a failed test on a previous run first, before specs where all the tests passed. object FailureFirstSpecExecutionOrder : SpecExecutionOrder |
FinalizeSpec |
typealias FinalizeSpec = (Tuple2<KClass<out Spec>, Map<TestCase, TestResult>>) -> Unit |
IsolationMode |
enum class IsolationMode |
LexicographicSpecExecutionOrder |
An implementation of SpecExecutionOrder which will run specs in a lexicographic order. object LexicographicSpecExecutionOrder : SpecExecutionOrder |
PrepareSpec |
typealias PrepareSpec = (KClass<out Spec>) -> Unit |
RandomSpecExecutionOrder |
An implementation of SpecExecutionOrder which will run specs in a different random order each time the are executed. object RandomSpecExecutionOrder : SpecExecutionOrder |
Spec |
abstract class Spec : TestConfiguration, SpecCallbackMethods |
SpecCallbackMethods |
Contains methods which can be overriden to set config in the same way that KotlinTest 3.x allowed. The preferred style is to call the DSL functions from within the tests but these methods are still supported and will not be deprecated. interface SpecCallbackMethods |
SpecDsl |
interface SpecDsl |
SpecExecutionOrder |
Note: This has no effect on non-JVM targets. interface SpecExecutionOrder |
TestCaseExtensionFn |
typealias TestCaseExtensionFn = suspend (testCase: TestCase, execute: suspend (TestCase) -> TestResult) -> TestResult |
TestConfiguration |
The parent of all configuration DSL objects and contains configuration methods common to both Spec and TestFactoryConfiguration implementations. abstract class TestConfiguration |
AutoScan |
annotation class AutoScan |
DisplayName |
annotation class DisplayName |
DoNotParallelize |
annotation class DoNotParallelize |
JsTest |
The annotation JsTest is intercepted by the kotlin.js framework adapter to generate tests. It is simply an alias to kotlin.test.Test on the JS target. annotation class JsTest |
Junit5EnabledIfSystemProperty |
annotation class Junit5EnabledIfSystemProperty |
Junit5TestFactory |
annotation class Junit5TestFactory |
kotlin.collections.List |
|
kotlin.reflect.KClass |
initializeRuntime |
val initializeRuntime: <ERROR CLASS> |
autoClose |
Register an AutoCloseable so that it's close methods is automatically invoked when the tests are completed. fun <T : AutoCloseable> TestConfiguration.autoClose(closeable: T): Tfun <T : AutoCloseable> TestConfiguration.autoClose(closeable: Lazy<T>): Lazy<T> |
focusTests |
Returns the focused root tests for this Spec. A focused test is one whose name begins with "f:". fun Spec.focusTests(): List<TestCase> |
materializeRootTests |
Returns the root tests from this Spec and any included factories. The returned list will be ordered according to the TestCaseOrder returned by project config, or if not defined, the kotest default. fun Spec.materializeRootTests(): List<RootTest> |
resolvedExtensions |
fun Spec.resolvedExtensions(): List<Extension> |
resolvedIsolationMode |
fun Spec.resolvedIsolationMode(): IsolationMode |
resolvedTestCaseOrder |
fun Spec.resolvedTestCaseOrder(): TestCaseOrder |
resolvedTestListeners |
Returns the resolved listeners for a given Spec. That is, the listeners defined directly on the spec, listeners generated from the callback-dsl methods, and listeners defined in any included test factories. fun Spec.resolvedTestListeners(): List<TestListener> |
tempfile |
fun TestConfiguration.tempfile(prefix: String? = null, suffix: String? = ".tmp"): File |