kotest-extensions / io.kotest.extensions.system / SystemOutWireListener

SystemOutWireListener

class SystemOutWireListener : TestListener

A Kotest listener that facilities testing writes to standard out, by redirecting any data written to standard out to an internal buffer.

Users can query the written data by fetching the buffer by invoking output.

Parameters

tee - If true then any data written to standard out will be captured as well as written out. If false then the data written will be captured only.

Constructors

<init>

A Kotest listener that facilities testing writes to standard out, by redirecting any data written to standard out to an internal buffer.

SystemOutWireListener(tee: Boolean = true)

Functions

afterTest

suspend fun afterTest(testCase: TestCase, result: TestResult): Unit

beforeTest

suspend fun beforeTest(testCase: TestCase): Unit

output

fun output(): String