ue4-test-runner 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/ue4-test-runner.exe +0 -0
- data/lib/TestResult/index.html +594 -0
- data/lib/TestResult/index.json +1243 -0
- data/lib/base_test.rb +15 -0
- data/lib/failed_test.rb +17 -0
- data/lib/final_test.rb +20 -0
- data/lib/parser.rb +23 -0
- data/lib/runner.rb +54 -0
- data/lib/successful_test.rb +11 -0
- data/lib/test_entry.rb +10 -0
- data/lib/ue4-test-runner.rb +2 -1
- metadata +10 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bd11605142b5d5802ff6e407ea9003be0f473db32acbcc06e47b6272a2597e7
|
4
|
+
data.tar.gz: 938512edf06006baabdb6f72afcf1528c441a6157eba4a5a04e8caa956022e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73c16249ac7de50d28dffd064912eb6084ea82b49f313bd0930ceab8972899ddb7906e83be8d8435d51cb5398ccfa29c2883e02e2b63f883534bf377765ecac
|
7
|
+
data.tar.gz: c075ffb4c4f2b578e15d40042b3d022c4ef0de5a4d0cd1e69d285f01ee31757c85d73796cdaee5b16017f7c2bbe5243c2b9fed5558101a09afe6644a392be380
|
data/bin/ue4-test-runner.exe
CHANGED
Binary file
|
@@ -0,0 +1,594 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<html lang="en">
|
4
|
+
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8">
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.5">
|
9
|
+
<title>Automation Test Results</title>
|
10
|
+
<link rel="stylesheet" href="/bower_components/font-awesome/css/font-awesome.min.css" type="text/css" />
|
11
|
+
<link rel="stylesheet" href="/bower_components/twentytwenty/css/twentytwenty.css" type="text/css" media="screen" />
|
12
|
+
<link rel="stylesheet" href="/bower_components/featherlight/release/featherlight.min.css" type="text/css" />
|
13
|
+
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css" type="text/css" />
|
14
|
+
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
15
|
+
<script src="/bower_components/jquery.event.move/js/jquery.event.move.js"></script>
|
16
|
+
<script src="/bower_components/jquery_lazyload/jquery.lazyload.js"></script>
|
17
|
+
<script src="/bower_components/twentytwenty/js/jquery.twentytwenty.js"></script>
|
18
|
+
<script src="/bower_components/clipboard/dist/clipboard.min.js"></script>
|
19
|
+
<script src="/bower_components/anchor-js/anchor.min.js"></script>
|
20
|
+
<script src="/bower_components/featherlight/release/featherlight.min.js"></script>
|
21
|
+
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
22
|
+
<script src="/bower_components/dustjs-linkedin/dist/dust-full.min.js"></script>
|
23
|
+
<script src="/bower_components/numeral/min/numeral.min.js"></script>
|
24
|
+
<style>
|
25
|
+
body {
|
26
|
+
font-family: font-family: Monaco, "Lucida Console", monospace;
|
27
|
+
background-color: #fff;
|
28
|
+
}
|
29
|
+
|
30
|
+
.background-success {
|
31
|
+
background-image: linear-gradient(to bottom,#24C031 0,#3dd94a 100%);
|
32
|
+
}
|
33
|
+
|
34
|
+
.background-warning {
|
35
|
+
background-image: linear-gradient(to bottom,#FF9900 0,#FF9900 100%);
|
36
|
+
}
|
37
|
+
|
38
|
+
.background-error {
|
39
|
+
background-image: linear-gradient(to bottom,#CE3323 0,#e74c3c 100%);
|
40
|
+
}
|
41
|
+
|
42
|
+
.success-color {
|
43
|
+
color: #3dd94a;
|
44
|
+
}
|
45
|
+
|
46
|
+
.warning-color {
|
47
|
+
color: #FF9900;
|
48
|
+
}
|
49
|
+
|
50
|
+
.error-color {
|
51
|
+
color: #e74c3c;
|
52
|
+
}
|
53
|
+
|
54
|
+
.symbol-summary {
|
55
|
+
overflow: hidden;
|
56
|
+
*zoom: 1;
|
57
|
+
-webkit-padding-start: 25px;
|
58
|
+
margin-top: 15px;
|
59
|
+
margin-right: 15px;
|
60
|
+
margin-bottom: 0px;
|
61
|
+
line-height: 0.9;
|
62
|
+
}
|
63
|
+
|
64
|
+
.duration {
|
65
|
+
float: right;
|
66
|
+
padding-right: 10px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.bar {
|
70
|
+
padding-top: 10px;
|
71
|
+
padding-left: 10px;
|
72
|
+
padding-right: 10px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.summary {
|
76
|
+
font-size: 14px;
|
77
|
+
line-height: 14px;
|
78
|
+
color: #333;
|
79
|
+
-webkit-padding-start: 25px;
|
80
|
+
list-style-type: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
.summary ul {
|
84
|
+
list-style-type: none;
|
85
|
+
margin-left: 14px;
|
86
|
+
padding-top: 0;
|
87
|
+
padding-left: 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
.detailed-summary {
|
91
|
+
margin: 15px;
|
92
|
+
}
|
93
|
+
|
94
|
+
.detailed-summary pre {
|
95
|
+
display: block;
|
96
|
+
margin: 0 0 0px;
|
97
|
+
border: 0px solid #ccc;
|
98
|
+
}
|
99
|
+
|
100
|
+
.spec {
|
101
|
+
margin-top: 5px;
|
102
|
+
font-weight: bold;
|
103
|
+
display: inline-block;
|
104
|
+
}
|
105
|
+
|
106
|
+
.spec a {
|
107
|
+
font-weight: normal;
|
108
|
+
}
|
109
|
+
|
110
|
+
.suite {
|
111
|
+
margin-top: 15px;
|
112
|
+
}
|
113
|
+
|
114
|
+
.result {
|
115
|
+
margin-top: 0px;
|
116
|
+
}
|
117
|
+
|
118
|
+
.compare-artifact {
|
119
|
+
margin-top: 0px;
|
120
|
+
margin-bottom: 1px;
|
121
|
+
white-space: pre-wrap;
|
122
|
+
}
|
123
|
+
|
124
|
+
.image-artifact {
|
125
|
+
margin-top: 0px;
|
126
|
+
margin-bottom: 1px;
|
127
|
+
white-space: pre-wrap;
|
128
|
+
}
|
129
|
+
|
130
|
+
.log {
|
131
|
+
margin-top: 0px;
|
132
|
+
margin-bottom: 1px;
|
133
|
+
white-space: pre-wrap;
|
134
|
+
}
|
135
|
+
|
136
|
+
.log-level-Info {
|
137
|
+
color: #222;
|
138
|
+
}
|
139
|
+
|
140
|
+
.log-level-Warning {
|
141
|
+
color: #8a6d3b;
|
142
|
+
background-color: #fcf8e3;
|
143
|
+
border-color: #faebcc;
|
144
|
+
border-radius: 4px;
|
145
|
+
}
|
146
|
+
|
147
|
+
.log-level-Error {
|
148
|
+
color: #a94442;
|
149
|
+
background-color: #f2dede;
|
150
|
+
border-color: #ebccd1;
|
151
|
+
border-radius: 4px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.shadow-border {
|
155
|
+
box-shadow: 0px 0px 5px #AAA;
|
156
|
+
margin: 5px;
|
157
|
+
}
|
158
|
+
|
159
|
+
.code {
|
160
|
+
font-size: 9pt;
|
161
|
+
margin-top: 0px;
|
162
|
+
margin-bottom: 1px;
|
163
|
+
white-space: pre-wrap;
|
164
|
+
}
|
165
|
+
|
166
|
+
footer {
|
167
|
+
width: 100%;
|
168
|
+
margin: 0 auto;
|
169
|
+
margin-top: 20px;
|
170
|
+
padding: 0 30px;
|
171
|
+
overflow-y: hidden;
|
172
|
+
height: 40px;
|
173
|
+
background-color: #313233;
|
174
|
+
color: #fff;
|
175
|
+
font-size: 0.75em;
|
176
|
+
text-transform: uppercase;
|
177
|
+
letter-spacing: .1em;
|
178
|
+
line-height: 34px;
|
179
|
+
position: relative;
|
180
|
+
}
|
181
|
+
|
182
|
+
.excluded-from-view
|
183
|
+
{
|
184
|
+
display:none;
|
185
|
+
}
|
186
|
+
</style>
|
187
|
+
</head>
|
188
|
+
<body>
|
189
|
+
|
190
|
+
<!-- Root -->
|
191
|
+
<script type="text/dust" id="root">
|
192
|
+
<!-- Hero Block -->
|
193
|
+
<div class="jumbotron background-{@reportState /}" style="padding-left: 20px; margin: 0px">
|
194
|
+
<h1 style="font-size:3em; color:#fff"><i class="fa fa-{@reportIcon /}" aria-hidden="true"></i> Automation Results</h1>
|
195
|
+
<span style="font-size:1.5em; color:#fff"> {clientDescriptor}</span>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<!-- Nav tabs -->
|
199
|
+
<ul class="nav nav-tabs" role="tablist" style="margin-top: 10px">
|
200
|
+
<li role="presentation" class="active"><a href="#summary" aria-controls="summary" role="tab" data-toggle="tab">Summary <span class="badge">{totalTests}</span></a></li>
|
201
|
+
<li role="presentation"><a href="#warnings" aria-controls="warnings" role="tab" data-toggle="tab">Warnings <span class="badge">{succeededWithWarnings}</span></a></li>
|
202
|
+
<li role="presentation"><a href="#errors" aria-controls="errors" role="tab" data-toggle="tab">Errors <span class="badge">{failed}</span></a></li>
|
203
|
+
<div class="btn-group">
|
204
|
+
<button type="button" class="btn btn-light" id="ShowLogButton" data-toggle="button" aria-pressed="true" onclick="ShowHideLog('log-level-Info');">Log</button>
|
205
|
+
<button type="button" class="btn btn-warning" id="ShowWarningButton" data-toggle="button" aria-pressed="true" onclick="ShowHideLog('log-level-Warning');">Warning</button>
|
206
|
+
<button type="button" class="btn btn-danger" id="ShowErrorButton" data-toggle="button" aria-pressed="true" onclick="ShowHideLog('log-level-Error');">Error</button>
|
207
|
+
</div>
|
208
|
+
<span class="bar duration">Ran {totalRanTests} of {totalTests} tests in <strong>{totalDurationFormatted}</strong></span>
|
209
|
+
</ul>
|
210
|
+
|
211
|
+
<!-- Tab panes -->
|
212
|
+
<div class="tab-content">
|
213
|
+
{?hasArtifactComparisonIssues}
|
214
|
+
<div id="details{uniqueId}" class="detailed-summary panel panel-default" style="display: inline-block">
|
215
|
+
<div class="panel-heading">
|
216
|
+
<span class="glyphicon glyphicon-gift" aria-hidden="true"></span><span> How To Resolve Screenshot Differences</span>
|
217
|
+
</div>
|
218
|
+
<div class="panel-body">
|
219
|
+
Open the <strong>Screenshot Comparison Tool</strong> (Window > Automation Frontend > Screenshot Comparison) in the editor and point it at,<br />{comparisonExportDirectory}
|
220
|
+
<br />
|
221
|
+
<br />
|
222
|
+
<div style="position: relative;">
|
223
|
+
<img src="/img/ScreenshotBrowser.png" draggable="false" />
|
224
|
+
<span style="position: absolute; left: 10px; top: 33px; width: 700px;">{comparisonExportDirectory}</span>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
{/hasArtifactComparisonIssues}
|
229
|
+
<div role="tabpanel" class="tab-pane active" id="summary">
|
230
|
+
<ul class="symbol-summary">
|
231
|
+
{#specs}
|
232
|
+
{>"symbol-summary"/}
|
233
|
+
{/specs}
|
234
|
+
</ul>
|
235
|
+
<ul class="summary">
|
236
|
+
{#specs}
|
237
|
+
{>"spec"/}
|
238
|
+
{/specs}
|
239
|
+
</ul>
|
240
|
+
</div>
|
241
|
+
<div role="tabpanel" class="tab-pane" id="errors">
|
242
|
+
{#failures}
|
243
|
+
{>"detailed-summary"/}
|
244
|
+
{/failures}
|
245
|
+
</div>
|
246
|
+
<div role="tabpanel" class="tab-pane" id="warnings">
|
247
|
+
{#warnings}
|
248
|
+
{>"detailed-summary"/}
|
249
|
+
{/warnings}
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
<br />
|
253
|
+
<br />
|
254
|
+
<br />
|
255
|
+
</script>
|
256
|
+
|
257
|
+
<!-- Symbol-Summary -->
|
258
|
+
<script type="text/dust" id="symbol-summary">
|
259
|
+
{?symbol}
|
260
|
+
<span class="glyphicon glyphicon-stop {symbol}" style="cursor: pointer;" title="{details.testDisplayName}" data-toggle="collapse" data-target="#{details.uniqueId}" href="#{details.uniqueId}" onclick="setTimeout(function () { document.getElementById('details{details.uniqueId}').scrollIntoView() }, 100)" aria-hidden="true"></span>
|
261
|
+
{/symbol}
|
262
|
+
{?specs}
|
263
|
+
{/specs}
|
264
|
+
{#specs}
|
265
|
+
{>"symbol-summary"/}
|
266
|
+
{/specs}
|
267
|
+
{?specs}
|
268
|
+
{/specs}
|
269
|
+
</script>
|
270
|
+
|
271
|
+
<!-- Spec -->
|
272
|
+
<script type="text/dust" id="spec">
|
273
|
+
{?hasDetails}
|
274
|
+
<li class="{style}" style="cursor: pointer;" data-toggle="collapse" data-target="#{details.uniqueId}">{title|s}</li>
|
275
|
+
<br />
|
276
|
+
<div id="{details.uniqueId}" class="collapse">
|
277
|
+
{#details}
|
278
|
+
{>"detailed-summary"/}
|
279
|
+
{/details}
|
280
|
+
</div>
|
281
|
+
{:else}
|
282
|
+
<li class="{style}">
|
283
|
+
<p>{title|s}</p>
|
284
|
+
</li>
|
285
|
+
{/hasDetails}
|
286
|
+
{?specs}
|
287
|
+
<ul>
|
288
|
+
{#specs}
|
289
|
+
{>"spec"/}
|
290
|
+
{/specs}
|
291
|
+
</ul>
|
292
|
+
{/specs}
|
293
|
+
</script>
|
294
|
+
|
295
|
+
<!-- detailed-summary -->
|
296
|
+
<script type="text/dust" id="detailed-summary">
|
297
|
+
<div id="details{uniqueId}" class="detailed-summary panel {panelType}">
|
298
|
+
<div class="btn-group" style="float: right" role="group" aria-label="...">
|
299
|
+
<button type="button" class="btn btn-default copy" data-clipboard-text="-ExecCmds="Automation RunTests {fullTestPath}; Quit"" title="Copy run commandline to clipboard">
|
300
|
+
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
|
301
|
+
</button>
|
302
|
+
</div>
|
303
|
+
<div class="panel-heading">
|
304
|
+
<h3 class="panel-title" style="line-height: 1.5;">{fullTestPath}</h3>
|
305
|
+
</div>
|
306
|
+
<div class="panel-body">
|
307
|
+
<pre>
|
308
|
+
{?entries}
|
309
|
+
{#entries artifacts=artifacts}
|
310
|
+
{>"entry" artifacts=artifacts /}
|
311
|
+
{/entries}
|
312
|
+
{:else}
|
313
|
+
no events
|
314
|
+
{/entries}
|
315
|
+
</pre>
|
316
|
+
</div>
|
317
|
+
</div>
|
318
|
+
</script>
|
319
|
+
|
320
|
+
<!-- Artifact -->
|
321
|
+
<script type="text/dust" id="Artifact">
|
322
|
+
{>"Artifact-{type}"/}
|
323
|
+
</script>
|
324
|
+
|
325
|
+
<!-- Artifact-Image -->
|
326
|
+
<script type="text/dust" id="Artifact-Image">
|
327
|
+
<p class="image-artifact">
|
328
|
+
<span style="display: table-row;">{name}</span>
|
329
|
+
<img style="height: 400px" class="lazy lightbox shadow-border" data-original="{files.image}" />
|
330
|
+
</p>
|
331
|
+
</script>
|
332
|
+
|
333
|
+
<!-- Artifact-Comparison -->
|
334
|
+
<script type="text/dust" id="Artifact-Comparison">
|
335
|
+
<p class="compare-artifact">
|
336
|
+
<span style="display: table-row;">{name}</span>
|
337
|
+
<div>
|
338
|
+
<img style="height: 100px" class="lazy lightbox shadow-border" data-original="{files.approved}" data-featherlight="{files.approved}" />
|
339
|
+
<img style="height: 100px" class="lazy lightbox shadow-border" data-original="{files.difference}" data-featherlight="{files.difference}" />
|
340
|
+
<img style="height: 100px" class="lazy lightbox shadow-border" data-original="{files.unapproved}" data-featherlight="{files.unapproved}" />
|
341
|
+
</div>
|
342
|
+
<div style="width: 885px; height: 500px;" class="shadow-border">
|
343
|
+
<div class="twentytwenty-container">
|
344
|
+
<!-- The before image is first -->
|
345
|
+
<img style="width: 885px; height: 500px;" class="lazy" data-original="{files.approved}" />
|
346
|
+
<!-- The after image is last -->
|
347
|
+
<img style="width: 885px; height: 500px;" class="lazy" data-original="{files.unapproved}" />
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
</p>
|
351
|
+
</script>
|
352
|
+
|
353
|
+
<!-- entry -->
|
354
|
+
<script type="text/dust" id="entry">
|
355
|
+
<span class="logline log-level-{event.type}">
|
356
|
+
{?filename}
|
357
|
+
<span class="log log-level-{event.type}" style="display: inline-block">
|
358
|
+
|
359
|
+
<i class="fa fa-{@eventIcon /}" aria-hidden="true"> </i>
|
360
|
+
<a class="log log-level-{event.type}" href="file://{filename}">{@getCleanFilename value=filename /}({lineNumber})</a>
|
361
|
+
</span>: {event.message}
|
362
|
+
{:else}
|
363
|
+
<p class="log log-level-{event.type}">
|
364
|
+
|
365
|
+
<i class="fa fa-{@eventIcon /}" aria-hidden="true"> </i>
|
366
|
+
{event.message}
|
367
|
+
</p>
|
368
|
+
{/filename}
|
369
|
+
<br />
|
370
|
+
{@resolveArtifact event=event}
|
371
|
+
<div class="log log-level-{event.type}">
|
372
|
+
{>"Artifact" /}
|
373
|
+
</div>
|
374
|
+
{/resolveArtifact}
|
375
|
+
</span>
|
376
|
+
</script>
|
377
|
+
|
378
|
+
<div id="output">
|
379
|
+
</div>
|
380
|
+
</body>
|
381
|
+
|
382
|
+
<script type="text/javascript">
|
383
|
+
|
384
|
+
function ShowHideLog(e)
|
385
|
+
{
|
386
|
+
const LogsOfClass = document.querySelectorAll('.logline.' + e);
|
387
|
+
LogsOfClass.forEach(i => i.classList.toggle('excluded-from-view'));
|
388
|
+
}
|
389
|
+
|
390
|
+
dust.helpers.reportState = function (chunk, context, bodies, params) {
|
391
|
+
var testState = context.get("failed") > 0 ? "error" : context.get("succeededWithWarnings") > 0 ? "warning" : "success";
|
392
|
+
return chunk.write(testState);
|
393
|
+
};
|
394
|
+
|
395
|
+
dust.helpers.reportIcon = function (chunk, context, bodies, params) {
|
396
|
+
var testState = context.get("failed") > 0 ? "bomb" : context.get("succeededWithWarnings") > 0 ? "exclamation-triangle" : "heartbeat";
|
397
|
+
return chunk.write(testState);
|
398
|
+
};
|
399
|
+
|
400
|
+
dust.helpers.eventIcon = function (chunk, context, bodies, params) {
|
401
|
+
let type = context.get("event.type");
|
402
|
+
|
403
|
+
if (type == "Error") {
|
404
|
+
return chunk.write("bomb");
|
405
|
+
} else if (type == "Warning") {
|
406
|
+
return chunk.write("exclamation-triangle");
|
407
|
+
}
|
408
|
+
};
|
409
|
+
|
410
|
+
dust.helpers.getCleanFilename = function (chunk, context, bodies, params) {
|
411
|
+
var filename = params.value.substring(params.value.lastIndexOf('\\') + 1);
|
412
|
+
return chunk.write(filename);
|
413
|
+
};
|
414
|
+
|
415
|
+
dust.helpers.testState = function (chunk, context, bodies, params) {
|
416
|
+
var testState = context.get("errors") > 0 ? "error" : context.get("warnings") > 0 ? "warning" : "success";
|
417
|
+
return chunk.write(testState);
|
418
|
+
};
|
419
|
+
|
420
|
+
dust.helpers.resolveArtifact = function (chunk, context, bodies, params) {
|
421
|
+
var artifacts = context.get("artifacts");
|
422
|
+
var artifactId = context.get("event.artifact");
|
423
|
+
var artifact = artifacts.find(function(artifact) {
|
424
|
+
return artifact.id == artifactId;
|
425
|
+
});
|
426
|
+
|
427
|
+
if (artifact) {
|
428
|
+
return chunk.render(bodies.block, context.push(artifact));
|
429
|
+
}
|
430
|
+
|
431
|
+
return chunk.write("");
|
432
|
+
};
|
433
|
+
|
434
|
+
function compileTemplate(templateName) {
|
435
|
+
var src = document.getElementById(templateName).textContent;
|
436
|
+
var compiled = dust.compile(src, templateName);
|
437
|
+
return dust.loadSource(compiled);
|
438
|
+
}
|
439
|
+
|
440
|
+
compileTemplate("Artifact");
|
441
|
+
compileTemplate("Artifact-Comparison");
|
442
|
+
compileTemplate("Artifact-Image");
|
443
|
+
compileTemplate("entry");
|
444
|
+
compileTemplate("detailed-summary");
|
445
|
+
compileTemplate("spec");
|
446
|
+
compileTemplate("symbol-summary");
|
447
|
+
var rootTemplate = compileTemplate("root");
|
448
|
+
|
449
|
+
function getMatches(string, regex, index) {
|
450
|
+
index || (index = 1); // default to the first capturing group
|
451
|
+
var matches = [];
|
452
|
+
var match;
|
453
|
+
while (match = regex.exec(string)) {
|
454
|
+
matches.push(match[index]);
|
455
|
+
}
|
456
|
+
return matches;
|
457
|
+
}
|
458
|
+
|
459
|
+
$.getJSON("index.json", function (json) {
|
460
|
+
|
461
|
+
json.totalTests = json.succeeded + json.succeededWithWarnings + json.failed + json.notRun;
|
462
|
+
json.totalRanTests = json.succeeded + json.succeededWithWarnings + json.failed;
|
463
|
+
|
464
|
+
let date = new Date(null);
|
465
|
+
date.setSeconds(json.totalDuration);
|
466
|
+
json.totalDurationFormatted = date.toISOString().substr(11, 8);
|
467
|
+
|
468
|
+
let uniqueId = 0;
|
469
|
+
json.specs = [];
|
470
|
+
json.failures = [];
|
471
|
+
json.warnings = [];
|
472
|
+
json.style = 'suite';
|
473
|
+
json.hasArtifactComparisonIssues = false;
|
474
|
+
for (let step = 0; step < json.tests.length; step++) {
|
475
|
+
let test = json.tests[step];
|
476
|
+
|
477
|
+
if (test.state == 'Success') {
|
478
|
+
test.symbol = 'passed success-color';
|
479
|
+
test.panelType = 'panel-success';
|
480
|
+
}
|
481
|
+
|
482
|
+
if (test.warnings > 0) {
|
483
|
+
test.symbol = 'passed warning-color';
|
484
|
+
test.panelType = 'panel-warning';
|
485
|
+
json.warnings.push(json.tests[step]);
|
486
|
+
}
|
487
|
+
|
488
|
+
if (test.state == 'Failure' || json.tests[step].state == 'Fail') {
|
489
|
+
test.symbol = 'failed error-color';
|
490
|
+
test.panelType = 'panel-danger';
|
491
|
+
json.failures.push(json.tests[step]);
|
492
|
+
}
|
493
|
+
|
494
|
+
//TODO Artifact Resolution
|
495
|
+
|
496
|
+
test.uniqueId = uniqueId;
|
497
|
+
uniqueId++;
|
498
|
+
|
499
|
+
if (json.tests[step].artifacts != null && json.tests[step].artifacts.length > 0 && (json.tests[step].warnings > 0 || json.tests[step].errors > 0)) {
|
500
|
+
json.hasArtifactComparisonIssues = true;
|
501
|
+
}
|
502
|
+
|
503
|
+
let testPartsAll = json.tests[step].fullTestPath.split('.');
|
504
|
+
|
505
|
+
var testParts = new Array();
|
506
|
+
for (var i = 0; i < testPartsAll.length; i++) {
|
507
|
+
if (testPartsAll[i]) {
|
508
|
+
testParts.push(testPartsAll[i]);
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
let lastSpec = json;
|
513
|
+
for (let index = 0; index < testParts.length; index++) {
|
514
|
+
let name = testParts[index];
|
515
|
+
|
516
|
+
let linkRegex = /(?:^|\s)(\[.*?\])(?:\s|$)/g;
|
517
|
+
let matches = getMatches(name, linkRegex, 1);
|
518
|
+
|
519
|
+
for (let matchIndex = 0; matchIndex < matches.length; matchIndex++) {
|
520
|
+
name = name.replace(matches[0], "<a href='https://jira.it.epicgames.net/browse/" + matches[0].slice(1, -1) + "'>" + matches[0] + '</a>');
|
521
|
+
}
|
522
|
+
|
523
|
+
let foundSpec = null;
|
524
|
+
for (let specIndex = 0; specIndex < lastSpec.specs.length; specIndex++) {
|
525
|
+
if (lastSpec.specs[specIndex].title == name) {
|
526
|
+
foundSpec = lastSpec.specs[specIndex];
|
527
|
+
break;
|
528
|
+
}
|
529
|
+
}
|
530
|
+
|
531
|
+
if (foundSpec == null) {
|
532
|
+
foundSpec = { title: name, specs: [] };
|
533
|
+
lastSpec.specs.push(foundSpec);
|
534
|
+
}
|
535
|
+
|
536
|
+
lastSpec = foundSpec;
|
537
|
+
|
538
|
+
if (index == testParts.length - 1) {
|
539
|
+
lastSpec.details = json.tests[step];
|
540
|
+
lastSpec.style = json.tests[step].symbol + " spec";
|
541
|
+
lastSpec.symbol = json.tests[step].symbol;
|
542
|
+
lastSpec.hasDetails = function (chunk, context, bodies, params) {
|
543
|
+
console.log("testing");
|
544
|
+
return context.details != null && ((context.details.events != null && context.details.events.length > 0) || (context.details.artifacts != null && context.details.artifacts.length > 0));
|
545
|
+
};
|
546
|
+
} else {
|
547
|
+
lastSpec.style = 'suite';
|
548
|
+
}
|
549
|
+
}
|
550
|
+
}
|
551
|
+
|
552
|
+
let keepCollapsing = true;
|
553
|
+
while (keepCollapsing) {
|
554
|
+
if (json.specs.length == 1) {
|
555
|
+
if (json.title != null) {
|
556
|
+
json.specs[0].title = json.title + ' ' + json.specs[0].title;
|
557
|
+
}
|
558
|
+
json.title = json.specs[0].title;
|
559
|
+
json.style = json.specs[0].style;
|
560
|
+
json.symbol = json.specs[0].symbol;
|
561
|
+
json.hasDetails = json.specs[0].hasDetails;
|
562
|
+
json.specs = json.specs[0].specs;
|
563
|
+
} else {
|
564
|
+
keepCollapsing = false;
|
565
|
+
}
|
566
|
+
}
|
567
|
+
|
568
|
+
//console.log(json);
|
569
|
+
|
570
|
+
$(function () {
|
571
|
+
|
572
|
+
dust.render(rootTemplate, json, function (err, out) {
|
573
|
+
document.getElementById('output').innerHTML = out;
|
574
|
+
|
575
|
+
$(".twentytwenty-container").twentytwenty({
|
576
|
+
default_offset_pct: 0.5,
|
577
|
+
orientation: 'horizontal'
|
578
|
+
});
|
579
|
+
$("img.lazy").lazyload({
|
580
|
+
threshold: 1000
|
581
|
+
});
|
582
|
+
$('.lightbox').featherlight({ type: 'image' });
|
583
|
+
var clipboard = new ClipboardJS('.copy');
|
584
|
+
});
|
585
|
+
|
586
|
+
});
|
587
|
+
})
|
588
|
+
.fail(function (jqxhr, textStatus, error) {
|
589
|
+
var err = textStatus + ", " + error;
|
590
|
+
console.log("Request Failed: " + err);
|
591
|
+
});
|
592
|
+
</script>
|
593
|
+
|
594
|
+
</html>
|