-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (66 loc) · 2.42 KB
/
build.gradle
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
plugins {
id 'java'
}
group 'org.playtech.bdd'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
test {
useJUnitPlatform()
}
task regressionTests(type: Test) {
include '**/Runner*'
}
dependencies {
implementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
implementation 'org.junit.jupiter:junit-jupiter-engine'
implementation 'io.cucumber:cucumber-java:7.2.3'
implementation 'io.cucumber:cucumber-junit:7.2.3'
implementation 'org.seleniumhq.selenium:selenium-java:4.1.2'
// https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.3.1'
implementation group: 'io.cucumber', name: 'cucumber-testng', version: '7.2.3'
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
def tags = (findProperty('tags') == null) ? 'not @Ignore' : findProperty('tags') + ' and not @Ignore'
task cucumberTest() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
// systemProperties['configFileName'] = "env0_config.properties" (this is required for changing the environment in future)
systemProperties['browser'] = browser
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'rerun:target/failed.txt',
'--glue', 'com.test.stepdefinition',
'--threads', 2,
'--tags', "${tags}",
'src/test/resources']
}
}
}
task cucumberTestRerun() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
// systemProperties['configFileName'] = "env0_config.properties" (this is required for changing the environment in future)
systemProperties['browser'] = browser
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'rerun:target/failed.txt',
'--glue', 'com.test.stepdefinition',
'--threads', 2,
'--tags', "${tags}",
'src/test/resources']
}
}
}