Package-level declarations

Types

Link copied to clipboard
expect abstract class ClientLoader(timeoutSeconds: Int = 60)

Helper interface to test client.

actual abstract class ClientLoader(timeoutSeconds: Int)

Helper interface to test client.

actual abstract class ClientLoader(val timeoutSeconds: Int)

Helper interface to test client.

actual abstract class ClientLoader(timeoutSeconds: Int)

Helper interface to test client.

Link copied to clipboard
class TestClientBuilder<T : HttpClientEngineConfig>(var config: HttpClientConfig<T>.() -> Unit = {}, var test: suspend TestInfo.(client: HttpClient) -> Unit = {}, var after: suspend (client: HttpClient) -> Unit = {}, var repeatCount: Int = 1, var dumpAfterDelay: Long = -1, var concurrency: Int = 1)
Link copied to clipboard
class TestInfo(val threadId: Int, val attempt: Int)
Link copied to clipboard
abstract class TestWithKtor

Functions

Link copied to clipboard
fun TestClientBuilder<*>.after(block: suspend (client: HttpClient) -> Unit)
Link copied to clipboard
expect inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)

Asserts that block completed with given type of root cause.

actual inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)

Check that block completed with given type of root cause.

actual inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)

Check that block completed with given type of root cause.

actual inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)

Check that block completed with given type of root cause.

Link copied to clipboard
expect inline fun <T : Throwable> assertFailsWith(block: () -> Unit)

Asserts that a block fails with a specific exception of type T being thrown.

actual inline fun <T : Throwable> assertFailsWith(block: () -> Unit)

Asserts that a block fails with a specific exception of type T being thrown.

actual inline fun <T : Throwable> assertFailsWith(block: () -> Unit)

Asserts that a block fails with a specific exception of type T being thrown.

actual inline fun <T : Throwable> assertFailsWith(block: () -> Unit)

Asserts that a block fails with a specific exception of type T being thrown.

Link copied to clipboard
Link copied to clipboard
fun makeArray(size: Int): ByteArray
Link copied to clipboard
Link copied to clipboard
fun TestClientBuilder<*>.test(block: suspend TestInfo.(client: HttpClient) -> Unit)
Link copied to clipboard
fun testWithEngine(engine: HttpClientEngine, timeoutMillis: Long = 60 * 1000L, block: suspend TestClientBuilder<*>.() -> Unit)

Perform test with selected client engine.

fun <T : HttpClientEngineConfig> testWithEngine(factory: HttpClientEngineFactory<T>, loader: ClientLoader? = null, timeoutMillis: Long = 60L * 1000L, block: suspend TestClientBuilder<T>.() -> Unit)

Perform test with selected client engine factory.

Properties

Link copied to clipboard
const val TCP_SERVER: String

Proxy server url for tests.

Link copied to clipboard
const val TEST_SERVER: String

Web url for tests.

Link copied to clipboard

Websocket server url for tests.