mirror of https://github.com/usbharu/Hideout.git
13 lines
485 B
Kotlin
13 lines
485 B
Kotlin
import com.intuit.karate.junit5.Karate
|
|
|
|
object KarateUtil {
|
|
fun springBootKarateTest(path: String, scenario: String, clazz: Class<*>, port: String): Karate {
|
|
if (scenario.isEmpty()) {
|
|
return Karate.run(path).relativeTo(clazz).systemProperty("karate.port", port).karateEnv("dev")
|
|
} else {
|
|
return Karate.run(path).scenarioName(scenario).relativeTo(clazz).systemProperty("karate.port", port)
|
|
.karateEnv("dev")
|
|
}
|
|
}
|
|
}
|