withTestApplication

fun <R> withTestApplication(moduleFunction: Application.() -> Unit, test: TestApplicationEngine.() -> R): R
fun <R> withTestApplication(    moduleFunction: Application.() -> Unit,     configure: TestApplicationEngine.Configuration.() -> Unit = {},     test: TestApplicationEngine.() -> R): R

Deprecated

Please use new `testApplication` API: https://ktor.io/docs/migrating-2.html#testing-api

Starts a test application engine, passes it to the test function, and stops it.