-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
56 lines (44 loc) · 1.36 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
plugins {
id "groovy"
// id "org.sonarqube" version "2.6.2"
}
group = "com.evry.ace"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
compile "org.codehaus.groovy:groovy-all:2.5.0"
testCompile "com.lesfurets:jenkins-pipeline-unit:1.1"
testCompile "junit:junit:4.12"
// testCompile "org.apache.logging.log4j:log4j-slf4j-impl:2.8.1"
// runtime "org.apache.logging.log4j:log4j-core:2.8.1"
// runtime "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6"
// runtime "com.fasterxml.jackson.core:jackson-databind:2.8.6"
}
// sourceSets {
// main {
// groovy {
// srcDirs "vars"
// }
// }
// }
test {
// delete old test reports
dependsOn cleanTest
// don't stop if tests fail
ignoreFailures = true
// minimize logging
testLogging.maxGranularity = 0
// show stdout from tests
onOutput { dest, event -> print event.message }
// show test results
def results = []
afterTest { desc, result -> println "${desc.className.split("\\.")[-1]}: ${desc.name}: ${result.resultType}" }
afterSuite { desc, result -> if (desc.className) { results << result } }
// show summary
doLast {
println "Tests: ${results.sum { it.testCount }}, Failures: ${results.sum { it.failedTestCount }}" +
", Errors: ${results.sum { it.exceptions.size() }}, Skipped: ${results.sum { it.skippedTestCount }}"
}
}