-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChutneyJunitEngineTest.kt
32 lines (26 loc) · 1.21 KB
/
ChutneyJunitEngineTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.chutneytesting.hello
import com.chutneytesting.kotlin.dsl.ChutneyScenario
import com.chutneytesting.kotlin.junit.api.ChutneyTest
class ChutneyJunitEngineTest {
companion object {
@JvmField
val ENV_AS_FIELD = french_web
}
// Use a companion object to pass an environment definition from a val in com.chutneytesting.hello.Environments.english_web
@ChutneyTest(environment = "ENV_AS_FIELD")
fun `call a chutney website from french web using a jvm field`(): ChutneyScenario {
return call_a_chutney_website
}
// Takes environment definition from environment_path/CHUTNEY.json, set by system property 'chutney.environment.rootPath'
@ChutneyTest(environment = "english_web")
fun `call a chutney website from english web`(): ChutneyScenario {
return call_a_chutney_website
}
// Takes environment definition from environment_path/CHUTNEY.json, set by system property 'chutney.environment.rootPath'
@ChutneyTest(environment = "french_web")
fun `run a scenario 3 times using a different param for each execution`(): List<ChutneyScenario> {
return listOf("FIRST", "SECOND", "THIRD").map {
alwaysSuccessWithParam(it)
}
}
}