-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
82 lines (71 loc) · 2.08 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
plugins {
id 'org.springframework.boot' version '2.5.6'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'jacoco'
id 'java'
}
group = 'cucumber'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
sourceSets {
functionalTest {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
configurations {
cucumberRuntime {
extendsFrom functionalTestImplementation
}
}
dependencies {
implementation 'org.springdoc:springdoc-openapi-ui:1.5.13'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mock-server:mockserver-junit-jupiter:5.11.2'
testImplementation 'org.junit.platform:junit-platform-suite-api:1.8.1'
testImplementation 'io.cucumber:cucumber-java:6.11.0'
testImplementation 'io.cucumber:cucumber-junit:6.11.0'
testImplementation 'io.cucumber:cucumber-junit-platform-engine:6.11.0'
testImplementation 'io.cucumber:cucumber-spring:6.11.0'
functionalTestImplementation sourceSets.main.runtimeClasspath
functionalTestImplementation sourceSets.test.runtimeClasspath
}
jacoco {
toolVersion = '0.8.7'
}
jacocoTestReport {
dependsOn test
finalizedBy jacocoTestCoverageVerification
}
jacocoTestCoverageVerification {
dependsOn test
violationRules {
rule {
limit {
minimum = 0.8
}
}
}
}
test {
finalizedBy jacocoTestReport
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
task functionalTest(type: Test) {
description = 'Runs the functional tests.'
group = 'Verification'
useJUnitPlatform()
systemProperties = ["cucumber.filter.tags": System.getProperty("focused")?.toBoolean() ? "@Focus" : "not @Ignore"]
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.functionalTest.output
testClassesDirs = sourceSets.functionalTest.output.classesDirs
testLogging {
exceptionFormat = 'full'
}
}