-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
51 lines (42 loc) · 1.27 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
plugins {
id 'java'
}
group = 'org.rizkiamin'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.seleniumhq.selenium:selenium-java:4.13.0'
implementation 'io.github.bonigarcia:webdrivermanager:5.5.3'
testImplementation 'io.cucumber:cucumber-java:7.14.0'
testImplementation 'io.cucumber:cucumber-junit:7.14.0'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
//test {
// useJUnitPlatform()
//}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
def tags = (findProperty('tags') == null) ? 'not @exclude' : findProperty('tags') + ' and not @exclude'
tasks.register('cucumber') {
description("Running Cucumber Test")
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = [
'--plugin', 'html:reports/index.html',
'--plugin', 'pretty',
'--glue', 'com.redsky',
'--tags', "${tags}",
'src/test/resources'
]
}
}
}