forked from ssspe/gtest-report-prettify
-
Notifications
You must be signed in to change notification settings - Fork 4
/
gtest_example_output.html
575 lines (434 loc) · 21.6 KB
/
gtest_example_output.html
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
.number-container {padding: 20px; text-align: center;}
.test-suite-container {margin: 50px;}
.test-button {float: right;}
</style>
<title>Google Test Report</title>
</head>
<body>
<div>
<div class="card test-suite-container">
<h5 class="card-header">AllTests</h5>
<div class="card-body">
<div class="container">
<div class="row">
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-primary">
Number of tests: 9
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-success">
Passed: 3
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-danger">
Failed: 3
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-warning">
Disabled: 3
</span>
</h4>
</div>
</div>
</div>
<div class="list-group">
<a href=#TestCasesOneUnitTests class="list-group-item list-group-item-action">
TestCasesOneUnitTests
</a>
<a href=#TestCasesTwoUnitTests class="list-group-item list-group-item-action">
TestCasesTwoUnitTests
</a>
<a href=#TestCasesThreeUnitTests class="list-group-item list-group-item-action">
TestCasesThreeUnitTests
</a>
</div>
</div>
</div>
<div class="card test-suite-container" id=TestCasesOneUnitTests>
<div class="card-header">
<h5>
TestCasesOneUnitTests
<div class="btn-group btn-group-toggle test-button" data-toggle="buttons">
<label class="btn btn-primary btn-sm active">
<input type="radio" name="options" id=TestCasesOneUnitTestsAll autocomplete="off" checked> Show All
</label>
<label class="btn btn-success btn-sm">
<input type="radio" name="options" id=TestCasesOneUnitTestsPassed autocomplete="off"> Show Only Passed
</label>
<label class="btn btn-danger btn-sm">
<input type="radio" name="options" id=TestCasesOneUnitTestsFailed autocomplete="off"> Show Only Failed
</label>
<label class="btn btn-warning btn-sm">
<input type="radio" name="options" id=TestCasesOneUnitTestsDisabled autocomplete="off"> Show Only Disabled
</label>
</div>
</h5>
</div>
<div class="card-body">
<div class="container">
<div class="row">
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-primary">
Number of tests: 3
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-success">
Passed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-danger">
Failed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-warning">
Disabled: 1
</span>
</h4>
</div>
</div>
</div>
<div class="accordion" id=TestCasesOneUnitTestsFailedTests>
<div class="card border-danger mb-3">
<div class="card-header" id=TestThatFailesOneFailedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-danger" type="button" data-toggle="collapse" data-target=#TestThatFailesOneFailedCollapse aria-expanded="false" aria-controls=TestThatFailesOneFailedCollapse>
TestThatFailesOne
</button>
</h2>
</div>
<div id=TestThatFailesOneFailedCollapse class="collapse" aria-labelledby=TestThatFailesOneFailedHeading data-parent=#TestCasesOneUnitTestsFailedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
<p class="card-text">Failure: c:\users\spencer.robertson\documents\projects\cid\web services testing\webservicestests\webservicestests\test_cases_one.cpp:535
Value of: FALSE
Actual: false
Expected: true</p>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesOneUnitTestsPassedTests>
<div class="card border-success mb-3">
<div class="card-header" id=TestThatPassesOnePassedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-success" type="button" data-toggle="collapse" data-target=#TestThatPassesOnePassedCollapse aria-expanded="false" aria-controls=TestThatPassesOnePassedCollapse>
TestThatPassesOne
</button>
</h2>
</div>
<div id=TestThatPassesOnePassedCollapse class="collapse" aria-labelledby=TestThatPassesOnePassedHeading data-parent=#TestCasesOneUnitTestsPassedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesOneUnitTestsDisabledTests>
<div class="card border-warning mb-3">
<div class="card-header" id=DISABLED_TestThatIsDisabledOneDisabledHeading>
<h2 class="mb-0">
<button class="btn btn-link text-warning" type="button" data-toggle="collapse" data-target=#DISABLED_TestThatIsDisabledOneDisabledCollapse aria-expanded="false" aria-controls=DISABLED_TestThatIsDisabledOneDisabledCollapse>
DISABLED_TestThatIsDisabledOne
</button>
</h2>
</div>
<div id=DISABLED_TestThatIsDisabledOneDisabledCollapse class="collapse" aria-labelledby=DISABLED_TestThatIsDisabledOneDisabledHeading data-parent=#TestCasesOneUnitTestsDisabledTests>
<div class="card-body">
<h5 class="card-title">Disabled Test</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card test-suite-container" id=TestCasesTwoUnitTests>
<div class="card-header">
<h5>
TestCasesTwoUnitTests
<div class="btn-group btn-group-toggle test-button" data-toggle="buttons">
<label class="btn btn-primary btn-sm active">
<input type="radio" name="options" id=TestCasesTwoUnitTestsAll autocomplete="off" checked> Show All
</label>
<label class="btn btn-success btn-sm">
<input type="radio" name="options" id=TestCasesTwoUnitTestsPassed autocomplete="off"> Show Only Passed
</label>
<label class="btn btn-danger btn-sm">
<input type="radio" name="options" id=TestCasesTwoUnitTestsFailed autocomplete="off"> Show Only Failed
</label>
<label class="btn btn-warning btn-sm">
<input type="radio" name="options" id=TestCasesTwoUnitTestsDisabled autocomplete="off"> Show Only Disabled
</label>
</div>
</h5>
</div>
<div class="card-body">
<div class="container">
<div class="row">
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-primary">
Number of tests: 3
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-success">
Passed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-danger">
Failed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-warning">
Disabled: 1
</span>
</h4>
</div>
</div>
</div>
<div class="accordion" id=TestCasesTwoUnitTestsFailedTests>
<div class="card border-danger mb-3">
<div class="card-header" id=TestThatFailesTwoFailedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-danger" type="button" data-toggle="collapse" data-target=#TestThatFailesTwoFailedCollapse aria-expanded="false" aria-controls=TestThatFailesTwoFailedCollapse>
TestThatFailesTwo
</button>
</h2>
</div>
<div id=TestThatFailesTwoFailedCollapse class="collapse" aria-labelledby=TestThatFailesTwoFailedHeading data-parent=#TestCasesTwoUnitTestsFailedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
<p class="card-text">Failure: c:\users\spencer.robertson\documents\projects\cid\web services testing\webservicestests\webservicestests\test_cases_two.cpp:166
Value of: FALSE
Actual: false
Expected: true</p>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesTwoUnitTestsPassedTests>
<div class="card border-success mb-3">
<div class="card-header" id=TestThatPassesTwoPassedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-success" type="button" data-toggle="collapse" data-target=#TestThatPassesTwoPassedCollapse aria-expanded="false" aria-controls=TestThatPassesTwoPassedCollapse>
TestThatPassesTwo
</button>
</h2>
</div>
<div id=TestThatPassesTwoPassedCollapse class="collapse" aria-labelledby=TestThatPassesTwoPassedHeading data-parent=#TestCasesTwoUnitTestsPassedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesTwoUnitTestsDisabledTests>
<div class="card border-warning mb-3">
<div class="card-header" id=DISABLED_TestThatIsDisabledTwoDisabledHeading>
<h2 class="mb-0">
<button class="btn btn-link text-warning" type="button" data-toggle="collapse" data-target=#DISABLED_TestThatIsDisabledTwoDisabledCollapse aria-expanded="false" aria-controls=DISABLED_TestThatIsDisabledTwoDisabledCollapse>
DISABLED_TestThatIsDisabledTwo
</button>
</h2>
</div>
<div id=DISABLED_TestThatIsDisabledTwoDisabledCollapse class="collapse" aria-labelledby=DISABLED_TestThatIsDisabledTwoDisabledHeading data-parent=#TestCasesTwoUnitTestsDisabledTests>
<div class="card-body">
<h5 class="card-title">Disabled Test</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card test-suite-container" id=TestCasesThreeUnitTests>
<div class="card-header">
<h5>
TestCasesThreeUnitTests
<div class="btn-group btn-group-toggle test-button" data-toggle="buttons">
<label class="btn btn-primary btn-sm active">
<input type="radio" name="options" id=TestCasesThreeUnitTestsAll autocomplete="off" checked> Show All
</label>
<label class="btn btn-success btn-sm">
<input type="radio" name="options" id=TestCasesThreeUnitTestsPassed autocomplete="off"> Show Only Passed
</label>
<label class="btn btn-danger btn-sm">
<input type="radio" name="options" id=TestCasesThreeUnitTestsFailed autocomplete="off"> Show Only Failed
</label>
<label class="btn btn-warning btn-sm">
<input type="radio" name="options" id=TestCasesThreeUnitTestsDisabled autocomplete="off"> Show Only Disabled
</label>
</div>
</h5>
</div>
<div class="card-body">
<div class="container">
<div class="row">
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-primary">
Number of tests: 3
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-success">
Passed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-danger">
Failed: 1
</span>
</h4>
</div>
<div class="col-sm">
<h4 class="number-container">
<span class="badge badge-pill badge-warning">
Disabled: 1
</span>
</h4>
</div>
</div>
</div>
<div class="accordion" id=TestCasesThreeUnitTestsFailedTests>
<div class="card border-danger mb-3">
<div class="card-header" id=TestThatFailesThreeFailedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-danger" type="button" data-toggle="collapse" data-target=#TestThatFailesThreeFailedCollapse aria-expanded="false" aria-controls=TestThatFailesThreeFailedCollapse>
TestThatFailesThree
</button>
</h2>
</div>
<div id=TestThatFailesThreeFailedCollapse class="collapse" aria-labelledby=TestThatFailesThreeFailedHeading data-parent=#TestCasesThreeUnitTestsFailedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
<p class="card-text">Failure: c:\users\spencer.robertson\documents\projects\cid\web services testing\webservicestests\webservicestests\test_cases_three.cpp:138
Value of: FALSE
Actual: false
Expected: true</p>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesThreeUnitTestsPassedTests>
<div class="card border-success mb-3">
<div class="card-header" id=TestThatPassesThreePassedHeading>
<h2 class="mb-0">
<button class="btn btn-link text-success" type="button" data-toggle="collapse" data-target=#TestThatPassesThreePassedCollapse aria-expanded="false" aria-controls=TestThatPassesThreePassedCollapse>
TestThatPassesThree
</button>
</h2>
</div>
<div id=TestThatPassesThreePassedCollapse class="collapse" aria-labelledby=TestThatPassesThreePassedHeading data-parent=#TestCasesThreeUnitTestsPassedTests>
<div class="card-body">
<h5 class="card-title">Time: 0.002s</h5>
</div>
</div>
</div>
</div>
<div class="accordion" id=TestCasesThreeUnitTestsDisabledTests>
<div class="card border-warning mb-3">
<div class="card-header" id=DISABLED_TestThatIsDisabledThreeDisabledHeading>
<h2 class="mb-0">
<button class="btn btn-link text-warning" type="button" data-toggle="collapse" data-target=#DISABLED_TestThatIsDisabledThreeDisabledCollapse aria-expanded="false" aria-controls=DISABLED_TestThatIsDisabledThreeDisabledCollapse>
DISABLED_TestThatIsDisabledThree
</button>
</h2>
</div>
<div id=DISABLED_TestThatIsDisabledThreeDisabledCollapse class="collapse" aria-labelledby=DISABLED_TestThatIsDisabledThreeDisabledHeading data-parent=#TestCasesThreeUnitTestsDisabledTests>
<div class="card-body">
<h5 class="card-title">Disabled Test</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script>
$("label").click(function()
{
const testDesc = {"Passed": 6, "Failed": 6, "Disabled": 8}
const testDescAll = {"Passed": 6, "Failed": 6, "Disabled": 8, "All": 0}
var testSuiteID = $(this).find("input").attr("id");
showAll(testSuiteID);
for (var testName in testDesc)
{
var tempTestDesc = $.extend({}, testDesc);
if (testSuiteID.includes(testName))
{
// We need to hide everything other than the selected type
var testNameLen = tempTestDesc[testName]
delete tempTestDesc[testName]
for (var tempTestName in tempTestDesc)
{
var tempSuite = generateTestSuiteName(testSuiteID, testNameLen, tempTestName);
$(generateID(tempSuite)).hide();
}
}
}
function showAll(testSuiteID)
{
for (var testName in testDescAll)
{
var tempTestDesc = $.extend({}, testDescAll);
if (testSuiteID.includes(testName))
{
// We want to show everything
for (var tempTestName in tempTestDesc)
{
$(generateID(testSuiteID.replace(testName, tempTestName))).show();
}
}
}
}
function generateTestSuiteName(testSuiteName, len, newName) {
var tempName = testSuiteName.slice(0, -len) + newName;
return tempName;
}
function generateID(testSuiteID) {
return "#" + testSuiteID + "Tests";
}
})
</script>
</body>
</html>