ktor-server-test-host / io.ktor.server.testing / withApplication

withApplication

fun <R> withApplication(environment: ApplicationEngineEnvironment = createTestEnvironment(), configure: Configuration.() -> Unit = {}, test: TestApplicationEngine.() -> R): R

Start test application engine, pass it to test function and stop it