Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
abstract class ClientLoader(timeout: Duration = 1.minutes)

Helper interface to test clients.

Link copied to clipboard
fun interface EngineSelectionRule

Decides whether an engine should be tested or not.

Link copied to clipboard
class TestClientBuilder<out T : HttpClientEngineConfig>(    var config: HttpClientConfig<@UnsafeVariance T>.() -> Unit = {},     var test: suspend CoroutineScope.(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) : CoroutineContext.Element

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

Web url with TLS for tests.

Link copied to clipboard

Websocket server url for tests.

Link copied to clipboard
val CoroutineScope.testInfo: TestInfo?

Functions

Link copied to clipboard
fun TestClientBuilder<*>.after(block: suspend (client: HttpClient) -> Unit)
Link copied to clipboard
Link copied to clipboard
suspend fun <T : HttpClientEngineConfig> performTestWithEngine(    factory: HttpClientEngineFactory<T>,     loader: ClientLoader? = null,     block: suspend TestClientBuilder<T>.() -> Unit)
Link copied to clipboard
fun TestClientBuilder<*>.test(block: suspend CoroutineScope.(client: HttpClient) -> Unit)
Link copied to clipboard
fun testWithEngine(    engine: HttpClientEngine,     timeout: Duration = 1.minutes,     retries: Int = DEFAULT_RETRIES,     block: suspend TestClientBuilder<*>.() -> Unit): TestResult

Perform test with selected client engine.

fun <T : HttpClientEngineConfig> testWithEngine(    factory: HttpClientEngineFactory<T>,     loader: ClientLoader? = null,     timeout: Duration = 1.minutes,     retries: Int = DEFAULT_RETRIES,     block: suspend TestClientBuilder<T>.() -> Unit): TestResult

Perform test with selected client engine factory.