FrameworkAdapter

external interface FrameworkAdapter(source)

Serves as a bridge to a testing framework.

The tests structure is defined using internal functions suite and test, which delegate to corresponding functions of a FrameworkAdapter. Sample test layout:

suite('a suite', false, function() {
suite('a subsuite', false, function() {
test('a test', false, function() {...});
test('an ignored/pending test', true, function() {...});
});
suite('an ignored/pending test', true, function() {...});
});

Since Kotlin

1.1

Serves as a bridge to a testing framework.

The tests structure is defined using internal functions suite and test, which delegate to corresponding functions of a FrameworkAdapter. Sample test layout:

suite("top-level-package1", ignored = false) {
suite("TestClass1", ignored = false) {
suite("a subsuite", ignored = false) {
test("a test", ignored = false) {...}
test("an ignored/pending test", ignored = true) {...}
}
suite("an ignored/pending test", ignored = true) {...}
}
}

Since Kotlin

1.8

Serves as a bridge to a testing framework.

The tests structure is defined using internal functions suite and test, which delegate to corresponding functions of a FrameworkAdapter. Sample test layout:

suite("top-level-package1", ignored = false) {
suite("TestClass1", ignored = false) {
suite("a subsuite", ignored = false) {
test("a test", ignored = false) {...}
test("an ignored/pending test", ignored = true) {...}
}
suite("an ignored/pending test", ignored = true) {...}
}
}

Since Kotlin

1.8

Functions

Link copied to clipboard
abstract fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit)

Declares a test suite.

Since Kotlin 1.1
abstract fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit)

Declares a test suite.

Since Kotlin 1.8
abstract fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit)

Declares a test suite.

Since Kotlin 1.8
Link copied to clipboard
abstract fun test(name: String, ignored: Boolean, testFn: () -> Any?)

Declares a test.

Since Kotlin 1.1
abstract fun test(name: String, ignored: Boolean, testFn: () -> Any?)

Declares a test.

Since Kotlin 1.8
abstract fun test(name: String, ignored: Boolean, testFn: () -> Any?)

Declares a test.

Since Kotlin 1.8