Package io.ktor.server.testing
Types
abstract class EngineStressSuite<TEngine : ApplicationEngine, TConfiguration : Configuration> : |
|
abstract class EngineTestBase<TEngine : ApplicationEngine, TConfiguration : Configuration> : |
|
abstract class EngineTestSuite<TEngine : ApplicationEngine, TConfiguration : Configuration> : |
|
class HighLoadHttpGenerator This HTTP generator produces huge amount of requests however it doesn’t validate responses and doesn’t measure any time characteristics. |
|
object It it function receiver object |
|
object On on function receiver object |
|
class StressSuiteRunner : Runner |
|
class TestApplicationCall : Represents a test application call that is used in withTestApplication and handleRequest |
|
class TestApplicationEngine : ktor test engine that provides way to simulate application calls to existing application module(s) without actual HTTP connection |
|
class TestApplicationRequest : Represents a test application request |
|
class TestApplicationResponse : Represents test call response received from server |
|
object TestEngine : An ApplicationEngineFactory providing a CIO-based ApplicationEngine |
Functions
fun TestApplicationResponse.contentType(): ContentType Return parsed content type from the test response |
|
fun TestApplicationEngine.cookiesSession( Keep cookies between requests inside the callback. |
|
fun createTestEnvironment( Creates test application engine environment |
|
fun TestApplicationEngine.handleRequest( Make a test request |
|
DSL function for test test case assertions |
|
DSL for creating a test case |
|
fun TestApplicationRequest.setBody(value: String): Unit Set HTTP request body text content fun TestApplicationRequest.setBody(value: ByteArray): Unit Set HTTP request body bytes fun TestApplicationRequest.setBody( Set multipart HTTP request body |
|
fun <R> withApplication( Start test application engine, pass it to test function and stop it |
|
fun <R> withTestApplication( fun <R> withTestApplication( fun <R> withTestApplication( Start test application engine, pass it to test function and stop it |