Package io.ktor.client.tests.utils

Types

ClientLoader

abstract expect class ClientLoader

Helper interface to test client.

ClientRunner

class ClientRunner : Runner, Filterable

TestClientBuilder

class TestClientBuilder<T : HttpClientEngineConfig>

TestWithKtor

abstract class TestWithKtor

Extensions for External Classes

kotlin.collections.List

Properties

TEST_SERVER

const val TEST_SERVER: String

Local test server url.

Functions

clientTest

fun clientTest(
    engine: HttpClientEngine,
    block: suspend TestClientBuilder<*>.() -> Unit
): <ERROR CLASS>

Perform test with selected client engine.

fun clientTest(
    client: HttpClient = HttpClient(),
    block: suspend TestClientBuilder<HttpClientEngineConfig>.() -> Unit
): Unit

Perform test with selected client or client loaded by service loader.

fun <T : HttpClientEngineConfig> clientTest(
    factory: HttpClientEngineFactory<T>,
    block: suspend TestClientBuilder<T>.() -> Unit
): Unit

Perform test with selected client engine factory.

config

fun <T : HttpClientEngineConfig> TestClientBuilder<T>.config(
    block: HttpClientConfig<T>.() -> Unit
): Unit

main

fun main(): Unit

Start server for tests.

makeArray

fun makeArray(size: Int): ByteArray

makeString

fun makeString(size: Int): String

test

fun TestClientBuilder<*>.test(
    block: suspend (client: HttpClient) -> Unit
): Unit