-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
52 lines (43 loc) · 1.45 KB
/
build.gradle
File metadata and controls
52 lines (43 loc) · 1.45 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
plugins {
id 'java'
}
group = 'org.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.7.2'
implementation group: 'io.cucumber', name: 'cucumber-java', version: '7.15.0'
testImplementation group: 'io.cucumber', name: 'cucumber-junit', version: '7.15.0'
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.16.1'
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.6.2'
}
test {
useJUnitPlatform()
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
def tags = (findProperty('tags') == null) ? 'not @exlude' : findProperty('tags') + ' and not @exlude'
task 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:report/cucumber-report.html',
'--plugin', 'pretty',
'--glue', 'StepDef',
'--tags', "${tags}",
'src/test/java/features'
]
}
}
}