-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (62 loc) · 2.37 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
buildscript {
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.10.RELEASE"
}
}
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
}
group 'justinebateman.github.io'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE'
implementation group: 'org.springframework', name: 'spring-web', version: '5.2.3.RELEASE'
runtimeOnly 'org.springframework.boot:spring-boot-devtools:2.2.4.RELEASE'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.2'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.5"
implementation 'io.rest-assured:rest-assured:3.3.0'
testImplementation 'org.testng:testng:7.1.0'
testImplementation 'org.assertj:assertj-core:3.15.0'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
def includedGroups = System.getProperty('groups', '')
def excludedGroups = System.getProperty('excludedGroups', '')
useTestNG() {
suites '/src/test/resources/Tests.xml'
excludeGroups << excludedGroups
includeGroups << includedGroups
}
}
tasks.withType(Test) {
testLogging {
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showStackTraces true
showStandardStreams = true
info.exceptionFormat = debug.exceptionFormat
// display summary of test results at the end
afterSuite {desc, result ->
if (!desc.parent)
{
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}