-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
58 lines (52 loc) · 1.88 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
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'com.github.mkolisnyk:cucumber-runner:1.3.4'
compile group: 'io.rest-assured', name: 'rest-assured', version: '3.2.0'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.6'
testImplementation 'io.cucumber:cucumber-java:6.8.1'
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
task allScenarios() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty',
'--plugin', 'html:Report/cucumber-report',
'--plugin', 'json:Report/cucumber.json', //generates a .json report file
'--plugin', 'usage:Report/cucumber-usage.json',
'--glue', 'employee', 'src/test/resources/featureFiles']
}
}
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
def tags = getProperty("tags")
args = [
'--plugin', 'html:Report/cucumber-report',
'--plugin', 'json:Report/cucumber.json', //generates a .json report file
'--plugin', 'pretty',
'--plugin', 'usage:Report/cucumber-usage.json',
'--glue', 'employee', 'src/test/resources/featureFiles',
'--tags', tags]
}
}
}