-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
79 lines (63 loc) · 2.31 KB
/
build.gradle.kts
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 {
kotlin("jvm") version "1.3.61"
//id("com.github.spacialcircumstances.gradle-cucumber-reporting") version "0.1.15"
id("de.javaansehz.cluecumber-report-gradle-plugin") version "1.1.4"
}
group = "de.viaboxx"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation("junit", "junit", "4.12")
testImplementation("io.cucumber", "cucumber-java","5.1.2")
testImplementation("io.cucumber", "cucumber-junit", "5.1.2")
testImplementation("io.cucumber", "cucumber-junit-platform-engine", "5.1.2")
testImplementation("io.github.bonigarcia:webdrivermanager:3.8.1")
testImplementation("com.fasterxml.jackson.core", "jackson-databind", "2.10.0")
testImplementation("org.seleniumhq.selenium", "selenium-java", "3.141.59")
testImplementation("org.seleniumhq.selenium", "selenium-support", "3.141.59")
}
val reportTask= task<de.javaansehz.CluecumberReportTask>("report"){
// ;
}
tasks.withType<Test>().configureEach {
outputs.upToDateWhen { false } // disable test caching
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "12"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "12"
}
test {
finalizedBy(reportTask)
}
}
sourceSets {
create("integrationTest") {
withConvention(org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet::class) {
kotlin.srcDir("src/integration-tests/kotlin")
resources.srcDir("src/integration-tests/resources")
compileClasspath += sourceSets["main"].output + configurations["testRuntimeClasspath"]
runtimeClasspath += output + compileClasspath + sourceSets["test"].runtimeClasspath
}
}
}
val integrationTest = task<Test>("selenium") {
description = "Runs integration tests."
group = "verification"
testClassesDirs = sourceSets["integrationTest"].output.classesDirs
classpath = sourceSets["integrationTest"].runtimeClasspath
shouldRunAfter("test")
finalizedBy(reportTask)
}
configure<de.javaansehz.CluecumberReportExtension> {
sourceJsonReportDirectory = buildDir.path + "/cucumber-report.json"
generatedHtmlReportDirectory = buildDir.path + "/cucumber-report"
//expandBeforeAfterHooks=true
expandStepHooks=true
expandDocStrings=true
}