Tag¶
data class Tag(val name: String) : TestConfig.Element
Marks the test or an entire suite with a tag.
Some test runners may allow the user to only execute tests with a specific tag, or ignore tasks with a specific tag. A single test may be marked with multiple tags.
Example¶
Tag an entire suite:
Tag a specific test:
Constructors¶
Tag¶
constructor(name: String)
Types¶
Companion¶
object Companion : TestConfig.Key.Multi<Tag>
Properties¶
coroutineContext¶
The coroutine context configured for this test through the Context configuration.
Note that this is different from the coroutine context actually used to run tests; the value returned by this method contains the context declared in the config, whereas more elements are injected by the test machinery when the test actually starts.
key¶
open override val key: Tag.Companion
The identifier for this test configuration element.
name¶
Functions¶
get¶
operator fun <E : TestConfig.Element> TestConfig.get(key: TestConfig.Key<E, TestConfig.Uniqueness.Unique>): E?
Finds the Element identified by key in the current TestConfig.
It's not possible for multiple elements to share a key marked with Uniqueness.Unique, so this function can never return multiple results. However, no elements may be identified by a key, in which case null is returned.
operator fun <E : TestConfig.Element> TestConfig.get(key: TestConfig.Key<E, TestConfig.Uniqueness.Multi>): List<E>
Finds the elements identified by key in the current TestConfig.
Keys marked with Uniqueness.Multi allow multiple elements of the same type, so this function returns a list. If no elements are found, the returned list is empty.
plus¶
operator fun TestConfig.plus(other: TestConfig): TestConfig
Combines two TestConfig instances.
The elements of other always override or combine with the elements with the same key from the receiver (depending on the Key.uniqueness).