1
1
#! /usr/bin/env groovy
2
2
3
3
/**
4
- * Copyright (c) 2017 Informatics Matters Ltd.
4
+ * Copyright (c) 2018 Informatics Matters Ltd.
5
5
*
6
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
7
* you may not use this file except in compliance with the License.
@@ -43,6 +43,9 @@ import groovy.text.SimpleTemplateEngine
43
43
*/
44
44
class Tester {
45
45
46
+ // Version (try and update with every change/release)
47
+ String version = ' 1.0'
48
+
46
49
// Supported test-script versions
47
50
def supportedTestFileVersions = [1 ]
48
51
@@ -75,6 +78,7 @@ class Tester {
75
78
int sectionNumber = 0
76
79
int testsExecuted = 0
77
80
int testsIgnored = 0
81
+ int filesUsed = 0
78
82
def failedTests = []
79
83
def observedFiles = []
80
84
@@ -99,7 +103,11 @@ class Tester {
99
103
*/
100
104
boolean run () {
101
105
102
- // before we start - cleanup (everything)
106
+ // Log versions
107
+ info(" PipelineTester: v$version " )
108
+ info(" Supporting test file versions: $supportedTestFileVersions " )
109
+
110
+ // Before we start - cleanup (everything)
103
111
cleanUpOutput(true )
104
112
105
113
// Find all the potential test files
@@ -115,6 +123,7 @@ class Tester {
115
123
testScriptVersion = 0
116
124
testTimeoutSeconds = 30
117
125
collectionCreates = []
126
+ filesUsed + = 1
118
127
119
128
// We must not have duplicate test files -
120
129
// this indicates there are pipelines in different projects
@@ -212,9 +221,10 @@ class Tester {
212
221
println " Failed: $name "
213
222
}
214
223
}
215
- println " Num executed: $testsExecuted "
216
- println " Num ignored : $testsIgnored "
217
- println " Num failed : $failedTests . size "
224
+ println " Test Files : " + sprintf (' %4d' , filesUsed)
225
+ println " Tests : " + sprintf (' %4d' , testsExecuted)
226
+ println " Tests ignored: " + sprintf (' %4d' , testsIgnored)
227
+ println " Tests failed : " + sprintf (' %4d' , failedTests. size())
218
228
separate()
219
229
println " Passed: ${ testPassed.toString().toUpperCase()} "
220
230
0 commit comments