withApplication

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

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