-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (79 loc) · 2.93 KB
/
build.gradle
File metadata and controls
87 lines (79 loc) · 2.93 KB
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
77
78
79
80
81
82
83
84
85
86
87
plugins {
id 'java'
}
group 'abp_payload_measurement'
version '1.0-SNAPSHOT'
repositories {
mavenLocal()
maven {
url = 'https://repo.maven.apache.org/maven2'
}
}
dependencies {
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.18.1'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation group: 'io.cucumber', name: 'cucumber-java', version: '7.15.0'
testImplementation group: 'io.cucumber', name: 'cucumber-junit', version: '7.15.0'
// Manage webdriver executables
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.7.0'
// API
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'io.rest-assured:rest-assured:5.4.0'
// testImplementation 'io.rest-assured:json-path:5.4.0'
// implementation 'io.rest-assured:xml-path:5.4.0'
// implementation 'io.rest-assured:json-schema-validator:5.4.0'
// testImplementation 'com.jayway.restassured:rest-assured:2.9.0'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
task testingBrowser() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
mainClass = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args =
['--plugin', 'pretty',
'--plugin', 'junit:target/cucumber-reports/Cucumber.xml',
'--plugin', 'rerun:target/rerun.txt',
'--glue', 'configuration',
'--glue', 'steps', 'src/test/resources/features/browsertest.feature',
'--tags', "not @disabled"]
}
}
}
task testingApi() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
mainClass = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args =
['--plugin', 'pretty',
'--plugin', 'junit:target/cucumber-reports/Cucumber.xml',
'--plugin', 'rerun:target/rerun.txt',
'--glue', 'configuration',
'--glue', 'steps', 'src/test/resources/features/weatherApi.feature',
'--tags', "not @disabled"]
}
}
}
task rerunFailed() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty',
'--plugin', 'json:target/cucumber-reports/json/cucumber.json',
'--glue', 'configuration',
'--glue', 'steps', '@target/rerun.txt']
}
}
}