soda 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/SodaSuite +6 -1
- data/lib/Soda.rb +32 -11
- data/lib/SodaReportSummery.rb +642 -124
- data/lib/SodaReporter.rb +114 -15
- data/lib/SodaUtils.rb +4 -2
- metadata +4 -4
data/bin/SodaSuite
CHANGED
@@ -271,6 +271,8 @@ Optional Flags:
|
|
271
271
|
--restarttest: This is a soda test that will be ran right after the browser
|
272
272
|
is restarted.
|
273
273
|
|
274
|
+
--skipcsserrors: This tells soda to not report on css errors.
|
275
|
+
|
274
276
|
--help: Prints this message and exits.
|
275
277
|
|
276
278
|
HLP
|
@@ -556,7 +558,8 @@ def Main
|
|
556
558
|
[ '--sugarwait', '-w', GetoptLong::OPTIONAL_ARGUMENT ],
|
557
559
|
[ '--restartcount', '-1', GetoptLong::OPTIONAL_ARGUMENT ],
|
558
560
|
[ '--restarttest', '-2', GetoptLong::OPTIONAL_ARGUMENT],
|
559
|
-
[ '--reruntest', '-3', GetoptLong::OPTIONAL_ARGUMENT ]
|
561
|
+
[ '--reruntest', '-3', GetoptLong::OPTIONAL_ARGUMENT ],
|
562
|
+
[ '--skipcsserrors', '-4', GetoptLong::OPTIONAL_ARGUMENT]
|
560
563
|
)
|
561
564
|
|
562
565
|
opts.quiet = true
|
@@ -598,6 +601,8 @@ def Main
|
|
598
601
|
rerun_failed_test = true
|
599
602
|
when "--reruntest"
|
600
603
|
rerun_test_script = arg
|
604
|
+
when "--skipcsserrors"
|
605
|
+
params['errorskip'].push("css")
|
601
606
|
end
|
602
607
|
end
|
603
608
|
rescue Exception => e
|
data/lib/Soda.rb
CHANGED
@@ -469,7 +469,7 @@ class Soda
|
|
469
469
|
@rep.ReportFailure(msg)
|
470
470
|
raise(msg)
|
471
471
|
rescue Exception => e
|
472
|
-
@rep.ReportException(e
|
472
|
+
@rep.ReportException(e)
|
473
473
|
ensure
|
474
474
|
|
475
475
|
end
|
@@ -784,7 +784,7 @@ class Soda
|
|
784
784
|
script = SodaXML.new.parse(file)
|
785
785
|
end
|
786
786
|
rescue Exception => e
|
787
|
-
@rep.ReportException(e,
|
787
|
+
@rep.ReportException(e, file)
|
788
788
|
ensure
|
789
789
|
end
|
790
790
|
end
|
@@ -793,6 +793,7 @@ class Soda
|
|
793
793
|
if (dir !~ /lib/)
|
794
794
|
if(!is_restart && !@restart_test_running && file != @last_test)
|
795
795
|
@non_lib_test_count += 1
|
796
|
+
@rep.IncTestCount()
|
796
797
|
PrintDebug("Test since last restart: #{@non_lib_test_count +1}.\n")
|
797
798
|
end
|
798
799
|
end
|
@@ -869,12 +870,14 @@ class Soda
|
|
869
870
|
fd = Dir.open(file)
|
870
871
|
fd.each do |f|
|
871
872
|
files.push("#{file}/#{f}") if (f =~ /\.xml$/i)
|
873
|
+
# @rep.IncTestTotalCount() if (f !~ /lib/i)
|
872
874
|
end
|
873
875
|
fd.close()
|
874
876
|
|
875
877
|
if (files.empty?)
|
876
878
|
@rep.log("No tests found in directory: '#{file}'!\n",
|
877
879
|
SodaUtils::WARN)
|
880
|
+
@rep.IncTestWarningCount()
|
878
881
|
return nil
|
879
882
|
end
|
880
883
|
|
@@ -894,6 +897,7 @@ class Soda
|
|
894
897
|
RestartBrowserTest()
|
895
898
|
end
|
896
899
|
|
900
|
+
@rep.IncTestCount()
|
897
901
|
@non_lib_test_count += 1
|
898
902
|
@last_test = file
|
899
903
|
end
|
@@ -902,12 +906,13 @@ class Soda
|
|
902
906
|
if (script != nil)
|
903
907
|
parent_test_file = @currentTestFile
|
904
908
|
@currentTestFile = file
|
905
|
-
@rep.IncTestCount()
|
906
909
|
results = handleEvents(script)
|
907
910
|
PrintDebug("Test since last restart: #{@non_lib_test_count +1}.\n")
|
908
|
-
|
909
911
|
if (results != 0)
|
910
912
|
@FAILEDTESTS.push(@currentTestFile)
|
913
|
+
@rep.IncFailedTest()
|
914
|
+
else
|
915
|
+
@rep.IncTestPassedCount() if (file !~ /lib/i)
|
911
916
|
end
|
912
917
|
@currentTestFile = parent_test_file
|
913
918
|
else
|
@@ -938,6 +943,7 @@ class Soda
|
|
938
943
|
tmp_file = File.basename(test_file)
|
939
944
|
if (tmp_file =~ /#{bhash['testfile']}/)
|
940
945
|
@rep.log("Blocklist: blocking file: \"#{test_file}\".\n")
|
946
|
+
@rep.IncBlockedTest()
|
941
947
|
result = true
|
942
948
|
break
|
943
949
|
end
|
@@ -1116,7 +1122,7 @@ class Soda
|
|
1116
1122
|
begin
|
1117
1123
|
text = @browser.text
|
1118
1124
|
rescue Exception => e
|
1119
|
-
@rep.ReportException(e
|
1125
|
+
@rep.ReportException(e)
|
1120
1126
|
text = ""
|
1121
1127
|
ensure
|
1122
1128
|
|
@@ -1410,6 +1416,7 @@ class Soda
|
|
1410
1416
|
else
|
1411
1417
|
PrintDebug("For some reason I got a nill @browser object!",
|
1412
1418
|
SodaUtils::WARN)
|
1419
|
+
@rep.IncTestWarningCount()
|
1413
1420
|
result['browser_closed'] = true
|
1414
1421
|
end
|
1415
1422
|
when "refresh"
|
@@ -1524,8 +1531,7 @@ class Soda
|
|
1524
1531
|
new_browser = @browser.attach(:url, url)
|
1525
1532
|
end
|
1526
1533
|
rescue Exception=>e
|
1527
|
-
@rep.ReportException(e,
|
1528
|
-
"Failed trying to attach to browser window!");
|
1534
|
+
@rep.ReportException(e, @currentTestFile);
|
1529
1535
|
|
1530
1536
|
e_dump = SodaUtils.DumpEvent(event)
|
1531
1537
|
@rep.log("Event Dump From Exception: #{e_dump}!\n",
|
@@ -1569,6 +1575,7 @@ class Soda
|
|
1569
1575
|
else
|
1570
1576
|
@rep.log("Found requires event without any children!\n",
|
1571
1577
|
SodaUtils::WARN)
|
1578
|
+
@rep.IncTestWarningCount()
|
1572
1579
|
end
|
1573
1580
|
end
|
1574
1581
|
end
|
@@ -1770,6 +1777,7 @@ class Soda
|
|
1770
1777
|
#
|
1771
1778
|
###############################################################################
|
1772
1779
|
def eventScript(event)
|
1780
|
+
results = 0
|
1773
1781
|
|
1774
1782
|
if (event.key?('file'))
|
1775
1783
|
# specified a new csv to file
|
@@ -1784,7 +1792,12 @@ class Soda
|
|
1784
1792
|
if (script != nil)
|
1785
1793
|
parent_script = @currentTestFile
|
1786
1794
|
@currentTestFile = event['file']
|
1787
|
-
handleEvents(script)
|
1795
|
+
results = handleEvents(script)
|
1796
|
+
if (@currentTestFile !~ /lib/i && results != 0)
|
1797
|
+
@rep.IncFailedTest()
|
1798
|
+
else
|
1799
|
+
@rep.IncTestPassedCount() if (@currentTestFile !~ /lib/i)
|
1800
|
+
end
|
1788
1801
|
@currentTestFile = parent_script
|
1789
1802
|
else
|
1790
1803
|
msg = "Failed opening script file: \"#{event['file']}\"!\n"
|
@@ -2168,8 +2181,10 @@ JSCode
|
|
2168
2181
|
else
|
2169
2182
|
@rep.log("Found unsupported value for <textfield clear" +
|
2170
2183
|
"=\"true/false\" />!\n", SodaUtils::WARN)
|
2184
|
+
@rep.IncTestWarningCount()
|
2171
2185
|
@rep.log("Unsupported clear value =>" +
|
2172
2186
|
" \"#{event['clear']}\".\n", SodaUtils::WARN)
|
2187
|
+
@rep.IncTestWarningCount()
|
2173
2188
|
end
|
2174
2189
|
end
|
2175
2190
|
when "focus"
|
@@ -2237,6 +2252,7 @@ JSCode
|
|
2237
2252
|
else
|
2238
2253
|
msg = "Failed to find supported field action.\n"
|
2239
2254
|
@rep.log(msg, SodaUtils::WARN)
|
2255
|
+
@rep.IncTestWarningCount()
|
2240
2256
|
e_dump = SodaUtils.DumpEvent(event)
|
2241
2257
|
@rep.log("Event Dump: #{e_dump}\n", SodaUtils::EVENT)
|
2242
2258
|
end
|
@@ -2590,16 +2606,18 @@ JSCode
|
|
2590
2606
|
@exceptionExit = true
|
2591
2607
|
@rep.log("Exception in test: \"#{@currentTestFile}\", Line: " +
|
2592
2608
|
"#{event['line_number']}!\n", SodaUtils::ERROR)
|
2593
|
-
@rep.ReportException(e,
|
2609
|
+
@rep.ReportException(e, @fileStack[@fileStack.length - 1]);
|
2594
2610
|
e_dump = SodaUtils.DumpEvent(event)
|
2595
2611
|
@rep.log("Event Dump From Exception: #{e_dump}!\n",
|
2596
2612
|
SodaUtils::EVENT)
|
2597
2613
|
|
2598
2614
|
if (exception_event != nil)
|
2599
2615
|
@rep.log("Running Exception Handler.\n", SodaUtils::WARN)
|
2616
|
+
@rep.IncTestWarningCount()
|
2600
2617
|
@exceptionExit = false
|
2601
2618
|
handleEvents(exception_event['children'])
|
2602
2619
|
@rep.log("Finished Exception Handler.\n", SodaUtils::WARN)
|
2620
|
+
@rep.IncTestWarningCount()
|
2603
2621
|
@exceptionExit = true
|
2604
2622
|
end
|
2605
2623
|
|
@@ -2689,14 +2707,14 @@ JSCode
|
|
2689
2707
|
@rep.ReportFailure(msg)
|
2690
2708
|
PrintDebug("Global Time was: #{$global_time}\n")
|
2691
2709
|
PrintDebug("Timeout Time was: #{time_check}\n")
|
2692
|
-
|
2710
|
+
@rep.IncTestWatchDogCount()
|
2693
2711
|
begin
|
2694
2712
|
result_dir = @rep.GetResultDir()
|
2695
2713
|
shooter = SodaScreenShot.new(result_dir)
|
2696
2714
|
image_file = shooter.GetOutputFile()
|
2697
2715
|
@rep.log("ScreenShot taken: #{image_file}\n")
|
2698
2716
|
rescue Excaption => e
|
2699
|
-
@rep.ReportException(e
|
2717
|
+
@rep.ReportException(e)
|
2700
2718
|
ensure
|
2701
2719
|
end
|
2702
2720
|
|
@@ -2714,9 +2732,12 @@ JSCode
|
|
2714
2732
|
|
2715
2733
|
if (result != 0)
|
2716
2734
|
master_result = -1
|
2735
|
+
else
|
2736
|
+
@rep.IncTestPassedCount()
|
2717
2737
|
end
|
2718
2738
|
else
|
2719
2739
|
msg = "Failed trying to run soda test: \"#{@currentTestFile}\"!\n"
|
2740
|
+
@rep.IncFailedTest()
|
2720
2741
|
@rep.ReportFailure(msg)
|
2721
2742
|
end
|
2722
2743
|
|
data/lib/SodaReportSummery.rb
CHANGED
@@ -221,7 +221,11 @@ def GenHtmlReport(data, reportfile, create_links = false)
|
|
221
221
|
report_file = ""
|
222
222
|
now = nil
|
223
223
|
|
224
|
+
totals['Test Warning Count'] = 0
|
225
|
+
totals['Test Other Failures'] = 0
|
226
|
+
totals['Test WatchDog Count'] = 0
|
224
227
|
totals['Test Failure Count'] = 0
|
228
|
+
totals['Test Passed Count'] = 0
|
225
229
|
totals['Test CSS Error Count'] = 0
|
226
230
|
totals['Test JavaScript Error Count'] = 0
|
227
231
|
totals['Test Assert Failures'] = 0
|
@@ -231,6 +235,8 @@ def GenHtmlReport(data, reportfile, create_links = false)
|
|
231
235
|
totals['Test Major Exceptions'] = 0
|
232
236
|
totals['Test Count'] = 0
|
233
237
|
totals['Test Skip Count'] = 0
|
238
|
+
totals['Test Blocked Count'] = 0
|
239
|
+
totals['Total Failure Count'] = 0
|
234
240
|
totals['running_time'] = nil
|
235
241
|
|
236
242
|
begin
|
@@ -251,102 +257,560 @@ def GenHtmlReport(data, reportfile, create_links = false)
|
|
251
257
|
html_header = <<HTML
|
252
258
|
<html>
|
253
259
|
<style type="text/css">
|
254
|
-
|
255
|
-
{
|
256
|
-
|
257
|
-
font-family: Arial, Verdana, Helvetica, sans-serif;
|
260
|
+
|
261
|
+
.highlight {
|
262
|
+
background-color: #8888FF;
|
258
263
|
}
|
259
264
|
|
260
|
-
|
261
|
-
|
262
|
-
color: #24f938;
|
265
|
+
.unhighlight {
|
266
|
+
background: #FFFFFF;
|
263
267
|
}
|
264
268
|
|
265
|
-
|
266
|
-
|
267
|
-
|
269
|
+
.td_header_master {
|
270
|
+
whitw-space: nowrap;
|
271
|
+
background: #99CCFF;
|
272
|
+
text-align: center;
|
273
|
+
font-family: Arial;
|
274
|
+
font-weight: bold;
|
275
|
+
font-size: 12px;
|
276
|
+
border-left: 0px solid black;
|
277
|
+
border-right: 2px solid black;
|
278
|
+
border-bottom: 2px solid black;
|
268
279
|
}
|
269
280
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
281
|
+
.td_header_sub {
|
282
|
+
whitw-space: nowrap;
|
283
|
+
background: #99CCFF;
|
284
|
+
text-align: center;
|
285
|
+
font-family: Arial;
|
286
|
+
font-weight: bold;
|
287
|
+
font-size: 12px;
|
288
|
+
border-left: 1px solid black;
|
289
|
+
border-right: 0px solid black;
|
290
|
+
border-bottom: 2px solid black;
|
276
291
|
}
|
277
292
|
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
293
|
+
.td_header_skipped {
|
294
|
+
whitw-space: nowrap;
|
295
|
+
background: #99CCFF;
|
296
|
+
text-align: center;
|
297
|
+
font-family: Arial;
|
298
|
+
font-weight: bold;
|
299
|
+
font-size: 12px;
|
300
|
+
border-left: 1px solid black;
|
301
|
+
border-right: 2px solid black;
|
302
|
+
border-bottom: 2px solid black;
|
284
303
|
}
|
285
304
|
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
305
|
+
.td_header_watchdog {
|
306
|
+
whitw-space: nowrap;
|
307
|
+
background: #99CCFF;
|
308
|
+
text-align: center;
|
309
|
+
font-family: Arial;
|
310
|
+
font-weight: bold;
|
311
|
+
font-size: 12px;
|
312
|
+
border-left: 0px solid black;
|
313
|
+
border-right: 0px solid black;
|
314
|
+
border-bottom: 2px solid black;
|
290
315
|
}
|
291
316
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
317
|
+
table {
|
318
|
+
width: 100%;
|
319
|
+
border: 2px solid black;
|
320
|
+
border-collapse: collapse;
|
321
|
+
padding: 0px;
|
322
|
+
background: #FFFFFF;
|
297
323
|
}
|
298
324
|
|
299
|
-
.
|
300
|
-
|
301
|
-
|
325
|
+
.td_file_data {
|
326
|
+
whitw-space: nowrap;
|
327
|
+
text-align: left;
|
328
|
+
font-family: Arial;
|
329
|
+
font-weight: bold;
|
330
|
+
font-size: 12px;
|
331
|
+
border-left: 0px solid black;
|
332
|
+
border-right: 2px solid black;
|
333
|
+
border-bottom: 2px solid black;
|
302
334
|
}
|
303
335
|
|
304
|
-
.
|
305
|
-
|
336
|
+
.td_run_data {
|
337
|
+
whitw-space: nowrap;
|
338
|
+
text-align: center;
|
339
|
+
font-family: Arial;
|
340
|
+
font-weight: bold;
|
341
|
+
font-size: 12px;
|
342
|
+
border-left: 0px solid black;
|
343
|
+
border-right: 0px solid black;
|
344
|
+
border-bottom: 0px solid black;
|
345
|
+
}
|
346
|
+
|
347
|
+
.td_run_data_error {
|
348
|
+
whitw-space: nowrap;
|
349
|
+
text-align: center;
|
350
|
+
font-family: Arial;
|
351
|
+
font-weight: bold;
|
352
|
+
color: #FF0000;
|
353
|
+
font-size: 12px;
|
354
|
+
border-left: 0px solid black;
|
355
|
+
border-right: 0px solid black;
|
356
|
+
border-bottom: 0px solid black;
|
357
|
+
}
|
358
|
+
|
359
|
+
.td_passed_data {
|
360
|
+
whitw-space: nowrap;
|
361
|
+
text-align: center;
|
362
|
+
font-family: Arial;
|
363
|
+
font-weight: bold;
|
364
|
+
color: #00FF00;
|
365
|
+
font-size: 12px;
|
366
|
+
border-left: 0px solid black;
|
367
|
+
border-right: 0px solid black;
|
368
|
+
border-bottom: 0px solid black;
|
369
|
+
}
|
370
|
+
|
371
|
+
.td_failed_data {
|
372
|
+
whitw-space: nowrap;
|
373
|
+
text-align: center;
|
374
|
+
font-family: Arial;
|
375
|
+
font-weight: bold;
|
376
|
+
color: #FF0000;
|
377
|
+
font-size: 12px;
|
378
|
+
border-left: 0px solid black;
|
379
|
+
border-right: 0px solid black;
|
380
|
+
border-bottom: 0px solid black;
|
381
|
+
}
|
382
|
+
|
383
|
+
.td_blocked_data {
|
384
|
+
whitw-space: nowrap;
|
385
|
+
text-align: center;
|
386
|
+
font-family: Arial;
|
387
|
+
font-weight: bold;
|
388
|
+
color: #FFCF10;
|
389
|
+
font-size: 12px;
|
390
|
+
border-left: 0px solid black;
|
391
|
+
border-right: 0px solid black;
|
392
|
+
border-bottom: 0px solid black;
|
393
|
+
}
|
394
|
+
|
395
|
+
.td_skipped_data {
|
396
|
+
whitw-space: nowrap;
|
397
|
+
text-align: center;
|
398
|
+
font-family: Arial;
|
399
|
+
font-weight: bold;
|
400
|
+
color: #D9D9D9;
|
401
|
+
font-size: 12px;
|
402
|
+
border-left: 0px solid black;
|
403
|
+
border-right: 2px solid black;
|
404
|
+
border-bottom: 0px solid black;
|
405
|
+
}
|
406
|
+
|
407
|
+
.td_watchdog_data {
|
408
|
+
whitw-space: nowrap;
|
409
|
+
text-align: center;
|
410
|
+
font-family: Arial;
|
411
|
+
font-weight: normal;
|
412
|
+
font-size: 12px;
|
413
|
+
border-left: 0px solid black;
|
414
|
+
border-right: 0px solid black;
|
415
|
+
border-bottom: 0px solid black;
|
416
|
+
}
|
417
|
+
|
418
|
+
.td_watchdog_error_data {
|
419
|
+
whitw-space: nowrap;
|
420
|
+
color: #FF0000;
|
421
|
+
text-align: center;
|
422
|
+
font-family: Arial;
|
423
|
+
font-weight: bold;
|
424
|
+
font-size: 12px;
|
425
|
+
border-left: 0px solid black;
|
426
|
+
border-right: 0px solid black;
|
427
|
+
border-bottom: 0px solid black;
|
428
|
+
}
|
429
|
+
|
430
|
+
.td_exceptions_data {
|
431
|
+
whitw-space: nowrap;
|
432
|
+
text-align: center;
|
433
|
+
font-family: Arial;
|
434
|
+
font-weight: normal;
|
435
|
+
font-size: 12px;
|
436
|
+
border-left: 0px solid black;
|
437
|
+
border-right: 0px solid black;
|
438
|
+
border-bottom: 0px solid black;
|
439
|
+
}
|
440
|
+
|
441
|
+
.td_exceptions_error_data {
|
442
|
+
whitw-space: nowrap;
|
443
|
+
text-align: center;
|
444
|
+
font-family: Arial;
|
445
|
+
font-weight: bold;
|
446
|
+
color: #FF0000;
|
447
|
+
font-size: 12px;
|
448
|
+
border-left: 0px solid black;
|
449
|
+
border-right: 0px solid black;
|
450
|
+
border-bottom: 0px solid black;
|
451
|
+
}
|
452
|
+
|
453
|
+
.td_javascript_data {
|
454
|
+
whitw-space: nowrap;
|
455
|
+
text-align: center;
|
456
|
+
font-family: Arial;
|
457
|
+
font-weight: normal;
|
458
|
+
font-size: 12px;
|
459
|
+
border-left: 0px solid black;
|
460
|
+
border-right: 0px solid black;
|
461
|
+
border-bottom: 0px solid black;
|
462
|
+
}
|
463
|
+
|
464
|
+
.td_javascript_error_data {
|
465
|
+
whitw-space: nowrap;
|
466
|
+
text-align: center;
|
467
|
+
font-family: Arial;
|
468
|
+
font-weight: bold;
|
469
|
+
color: #FF0000;
|
470
|
+
font-size: 12px;
|
471
|
+
border-left: 0px solid black;
|
472
|
+
border-right: 0px solid black;
|
473
|
+
border-bottom: 0px solid black;
|
474
|
+
}
|
475
|
+
|
476
|
+
.td_assert_data {
|
477
|
+
whitw-space: nowrap;
|
478
|
+
text-align: center;
|
479
|
+
font-family: Arial;
|
480
|
+
font-weight: normal;
|
481
|
+
font-size: 12px;
|
482
|
+
border-left: 0px solid black;
|
483
|
+
border-right: 0px solid black;
|
484
|
+
border-bottom: 0px solid black;
|
485
|
+
}
|
486
|
+
|
487
|
+
.td_assert_error_data {
|
488
|
+
whitw-space: nowrap;
|
489
|
+
text-align: center;
|
490
|
+
font-family: Arial;
|
491
|
+
font-weight: bold;
|
492
|
+
color: #FF0000;
|
493
|
+
font-size: 12px;
|
494
|
+
border-left: 0px solid black;
|
495
|
+
border-right: 0px solid black;
|
496
|
+
border-bottom: 0px solid black;
|
497
|
+
}
|
498
|
+
|
499
|
+
.td_other_data {
|
500
|
+
whitw-space: nowrap;
|
501
|
+
text-align: center;
|
502
|
+
font-family: Arial;
|
503
|
+
font-weight: normal;
|
504
|
+
font-size: 12px;
|
505
|
+
border-left: 0px solid black;
|
506
|
+
border-right: 0px solid black;
|
507
|
+
border-bottom: 0px solid black;
|
508
|
+
}
|
509
|
+
|
510
|
+
.td_other_error_data {
|
511
|
+
whitw-space: nowrap;
|
512
|
+
text-align: center;
|
513
|
+
font-family: Arial;
|
514
|
+
font-weight: bold;
|
515
|
+
color: #FF0000;
|
516
|
+
font-size: 12px;
|
517
|
+
border-left: 0px solid black;
|
518
|
+
border-right: 0px solid black;
|
519
|
+
border-bottom: 0px solid black;
|
520
|
+
}
|
521
|
+
|
522
|
+
.td_total_data {
|
523
|
+
whitw-space: nowrap;
|
524
|
+
text-align: center;
|
525
|
+
font-family: Arial;
|
526
|
+
font-weight: normal;
|
527
|
+
font-size: 12px;
|
528
|
+
border-left: 0px solid black;
|
529
|
+
border-right: 2px solid black;
|
530
|
+
border-bottom: 0px solid black;
|
531
|
+
}
|
532
|
+
|
533
|
+
.td_total_error_data {
|
534
|
+
whitw-space: nowrap;
|
535
|
+
text-align: center;
|
536
|
+
font-family: Arial;
|
537
|
+
font-weight: bold;
|
538
|
+
color: #FF0000;
|
539
|
+
font-size: 12px;
|
540
|
+
border-left: 0px solid black;
|
541
|
+
border-right: 2px solid black;
|
542
|
+
border-bottom: 0px solid black;
|
543
|
+
}
|
544
|
+
|
545
|
+
.td_css_data {
|
546
|
+
whitw-space: nowrap;
|
547
|
+
text-align: center;
|
548
|
+
font-family: Arial;
|
549
|
+
font-weight: normal;
|
550
|
+
font-size: 12px;
|
551
|
+
border-left: 0px solid black;
|
552
|
+
border-right: 0px solid black;
|
553
|
+
border-bottom: 0px solid black;
|
554
|
+
}
|
555
|
+
|
556
|
+
.td_sodawarnings_data {
|
557
|
+
whitw-space: nowrap;
|
558
|
+
text-align: center;
|
559
|
+
font-family: Arial;
|
560
|
+
font-weight: normal;
|
561
|
+
font-size: 12px;
|
562
|
+
border-left: 0px solid black;
|
563
|
+
border-right: 2px solid black;
|
564
|
+
border-bottom: 0px solid black;
|
565
|
+
}
|
566
|
+
|
567
|
+
.td_time_data {
|
568
|
+
whitw-space: nowrap;
|
569
|
+
text-align: center;
|
570
|
+
font-family: Arial;
|
571
|
+
font-weight: normal;
|
572
|
+
font-size: 12px;
|
573
|
+
border-left: 0px solid black;
|
574
|
+
border-right: 1px solid black;
|
575
|
+
border-bottom: 0px solid black;
|
576
|
+
}
|
577
|
+
|
578
|
+
.td_footer_run {
|
579
|
+
whitw-space: nowrap;
|
580
|
+
background: #99CCFF;
|
581
|
+
text-align: center;
|
582
|
+
font-family: Arial;
|
583
|
+
font-weight: bold;
|
584
|
+
font-size: 12px;
|
585
|
+
color: #000000;
|
586
|
+
border-top: 2px solid black;
|
587
|
+
border-left: 0px solid black;
|
588
|
+
border-right: 2px solid black;
|
589
|
+
border-bottom: 2px solid black;
|
590
|
+
}
|
591
|
+
|
592
|
+
.td_footer_passed {
|
593
|
+
whitw-space: nowrap;
|
594
|
+
background: #99CCFF;
|
595
|
+
text-align: center;
|
596
|
+
font-family: Arial;
|
597
|
+
font-weight: bold;
|
598
|
+
font-size: 12px;
|
599
|
+
color: #00FF00;
|
600
|
+
border-top: 2px solid black;
|
601
|
+
border-left: 0px solid black;
|
602
|
+
border-right: 0px solid black;
|
603
|
+
border-bottom: 2px solid black;
|
604
|
+
}
|
605
|
+
|
606
|
+
.td_footer_failed {
|
607
|
+
whitw-space: nowrap;
|
608
|
+
background: #99CCFF;
|
609
|
+
text-align: center;
|
610
|
+
font-family: Arial;
|
611
|
+
font-weight: bold;
|
612
|
+
font-size: 12px;
|
613
|
+
color: #FF0000;
|
614
|
+
border-top: 2px solid black;
|
615
|
+
border-left: 0px solid black;
|
616
|
+
border-right: 2px solid black;
|
617
|
+
border-bottom: 2px solid black;
|
618
|
+
}
|
619
|
+
|
620
|
+
.td_footer_blocked {
|
621
|
+
whitw-space: nowrap;
|
622
|
+
background: #99CCFF;
|
623
|
+
text-align: center;
|
624
|
+
font-family: Arial;
|
625
|
+
font-weight: bold;
|
626
|
+
font-size: 12px;
|
627
|
+
color: #FFCF10;
|
628
|
+
border-top: 2px solid black;
|
629
|
+
border-left: 0px solid black;
|
630
|
+
border-right: 0px solid black;
|
631
|
+
border-bottom: 2px solid black;
|
632
|
+
}
|
633
|
+
|
634
|
+
.td_footer_skipped {
|
635
|
+
whitw-space: nowrap;
|
636
|
+
background: #99CCFF;
|
637
|
+
text-align: center;
|
638
|
+
font-family: Arial;
|
639
|
+
font-weight: bold;
|
640
|
+
font-size: 12px;
|
641
|
+
color: #D9D9D9;
|
642
|
+
border-top: 2px solid black;
|
643
|
+
border-left: 0px solid black;
|
644
|
+
border-right: 2px solid black;
|
645
|
+
border-bottom: 2px solid black;
|
646
|
+
}
|
647
|
+
|
648
|
+
.td_footer_watchdog {
|
649
|
+
whitw-space: nowrap;
|
650
|
+
background: #99CCFF;
|
651
|
+
text-align: center;
|
652
|
+
font-family: Arial;
|
653
|
+
font-weight: bold;
|
654
|
+
font-size: 12px;
|
655
|
+
color: #FF0000;
|
656
|
+
border-top: 2px solid black;
|
657
|
+
border-left: 0px solid black;
|
658
|
+
border-right: 0px solid black;
|
659
|
+
border-bottom: 2px solid black;
|
660
|
+
}
|
661
|
+
|
662
|
+
.td_footer_exceptions {
|
663
|
+
whitw-space: nowrap;
|
664
|
+
background: #99CCFF;
|
665
|
+
text-align: center;
|
666
|
+
font-family: Arial;
|
667
|
+
font-weight: bold;
|
668
|
+
font-size: 12px;
|
669
|
+
color: #FF0000;
|
670
|
+
border-top: 2px solid black;
|
671
|
+
border-left: 0px solid black;
|
672
|
+
border-right: 0px solid black;
|
673
|
+
border-bottom: 2px solid black;
|
306
674
|
}
|
307
675
|
|
308
|
-
.
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
676
|
+
.td_footer_javascript {
|
677
|
+
whitw-space: nowrap;
|
678
|
+
background: #99CCFF;
|
679
|
+
text-align: center;
|
680
|
+
font-family: Arial;
|
681
|
+
font-weight: bold;
|
682
|
+
font-size: 12px;
|
683
|
+
color: #FF0000;
|
684
|
+
border-top: 2px solid black;
|
685
|
+
border-left: 0px solid black;
|
686
|
+
border-right: 0px solid black;
|
687
|
+
border-bottom: 2px solid black;
|
313
688
|
}
|
314
689
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
690
|
+
.td_footer_assert {
|
691
|
+
whitw-space: nowrap;
|
692
|
+
background: #99CCFF;
|
693
|
+
text-align: center;
|
694
|
+
font-family: Arial;
|
695
|
+
font-weight: bold;
|
696
|
+
font-size: 12px;
|
697
|
+
color: #FF0000;
|
698
|
+
border-top: 2px solid black;
|
699
|
+
border-left: 0px solid black;
|
700
|
+
border-right: 0px solid black;
|
701
|
+
border-bottom: 2px solid black;
|
702
|
+
}
|
703
|
+
|
704
|
+
.td_footer_other {
|
705
|
+
whitw-space: nowrap;
|
706
|
+
background: #99CCFF;
|
707
|
+
text-align: center;
|
708
|
+
font-family: Arial;
|
709
|
+
font-weight: bold;
|
710
|
+
font-size: 12px;
|
711
|
+
color: #FF0000;
|
712
|
+
border-top: 2px solid black;
|
713
|
+
border-left: 0px solid black;
|
714
|
+
border-right: 0px solid black;
|
715
|
+
border-bottom: 2px solid black;
|
716
|
+
}
|
717
|
+
|
718
|
+
.td_footer_total {
|
719
|
+
whitw-space: nowrap;
|
720
|
+
background: #99CCFF;
|
721
|
+
text-align: center;
|
722
|
+
font-family: Arial;
|
723
|
+
font-weight: bold;
|
724
|
+
font-size: 12px;
|
725
|
+
color: #FF0000;
|
726
|
+
border-top: 2px solid black;
|
727
|
+
border-left: 2px solid black;
|
728
|
+
border-right: 2px solid black;
|
729
|
+
border-bottom: 2px solid black;
|
730
|
+
}
|
731
|
+
|
732
|
+
.td_footer_css {
|
733
|
+
whitw-space: nowrap;
|
734
|
+
background: #99CCFF;
|
735
|
+
text-align: center;
|
736
|
+
font-family: Arial;
|
737
|
+
font-weight: bold;
|
738
|
+
font-size: 12px;
|
739
|
+
color: #000000;
|
740
|
+
border-top: 2px solid black;
|
741
|
+
border-left: 0px solid black;
|
742
|
+
border-right: 0px solid black;
|
743
|
+
border-bottom: 2px solid black;
|
744
|
+
}
|
745
|
+
|
746
|
+
.td_footer_sodawarnings {
|
747
|
+
whitw-space: nowrap;
|
748
|
+
background: #99CCFF;
|
749
|
+
text-align: center;
|
750
|
+
font-family: Arial;
|
751
|
+
font-weight: bold;
|
752
|
+
font-size: 12px;
|
753
|
+
color: #000000;
|
754
|
+
border-top: 2px solid black;
|
755
|
+
border-left: 0px solid black;
|
756
|
+
border-right: 0px solid black;
|
757
|
+
border-bottom: 2px solid black;
|
758
|
+
}
|
759
|
+
|
760
|
+
.td_footer_times {
|
761
|
+
whitw-space: nowrap;
|
762
|
+
background: #99CCFF;
|
763
|
+
text-align: center;
|
764
|
+
font-family: Arial;
|
765
|
+
font-weight: bold;
|
766
|
+
font-size: 12px;
|
767
|
+
color: #000000;
|
768
|
+
border-top: 2px solid black;
|
769
|
+
border-left: 2px solid black;
|
770
|
+
border-right: 0px solid black;
|
771
|
+
border-bottom: 2px solid black;
|
324
772
|
}
|
325
773
|
</style>
|
326
|
-
<title>Soda Global Report Summery: #{now}</title>
|
327
774
|
<body>
|
328
|
-
<li>#{now}</li>
|
329
775
|
<table>
|
330
|
-
<tr
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
776
|
+
<tr>
|
777
|
+
<td class="td_header_master" rowspan="2">Suite</br>
|
778
|
+
(click link for full report)</td>
|
779
|
+
<td class="td_header_master" colspan="5">Tests</td>
|
780
|
+
<td class="td_header_master" colspan="6">Failures</td>
|
781
|
+
<td class="td_header_master" colspan="2">Warnings</td>
|
782
|
+
<td class="td_header_master" rowspan="2">Run Time</br>(hh:mm:ss)</td>
|
783
|
+
</tr>
|
784
|
+
<tr>
|
785
|
+
<td class="td_header_sub">Run</td>
|
786
|
+
<td class="td_header_sub">Passed</td>
|
787
|
+
<td class="td_header_sub">Failed</td>
|
788
|
+
<td class="td_header_sub">Blocked</td>
|
789
|
+
<td class="td_header_skipped">Skipped</td>
|
790
|
+
<td class="td_header_watchdog">Watchdogs</td>
|
791
|
+
<td class="td_header_sub">Exceptions</td>
|
792
|
+
<td class="td_header_sub">JavaScript</br>Errors</td>
|
793
|
+
<td class="td_header_sub">Assert</br>Failures</td>
|
794
|
+
<td class="td_header_sub">Other</br>Failures</td>
|
795
|
+
<td class="td_header_skipped">Total</br>Failures</td>
|
796
|
+
<td class="td_header_watchdog">CSS Errors</td>
|
797
|
+
<td class="td_header_skipped">Soda</br>Warnings</td>
|
344
798
|
</tr>
|
345
799
|
HTML
|
346
800
|
|
347
801
|
fd.write(html_header)
|
348
802
|
|
349
803
|
data.each do |rpt|
|
804
|
+
totals['Test Warning Count'] +=
|
805
|
+
rpt['report_hash']['Test Warning Count'].to_i()
|
806
|
+
totals['Test Other Failures'] +=
|
807
|
+
rpt['report_hash']['Test Other Failures'].to_i()
|
808
|
+
totals['Test WatchDog Count'] +=
|
809
|
+
rpt['report_hash']['Test WatchDog Count'].to_i()
|
810
|
+
totals['Test Blocked Count'] +=
|
811
|
+
rpt['report_hash']['Test Blocked Count'].to_i()
|
812
|
+
totals['Test Passed Count'] +=
|
813
|
+
rpt['report_hash']['Test Passed Count'].to_i()
|
350
814
|
totals['Test Failure Count'] +=
|
351
815
|
rpt['report_hash']['Test Failure Count'].to_i()
|
352
816
|
totals['Test CSS Error Count'] +=
|
@@ -361,8 +825,6 @@ HTML
|
|
361
825
|
rpt['report_hash']['Test Assert Count'].to_i()
|
362
826
|
totals['Test Exceptions'] +=
|
363
827
|
rpt['report_hash']['Test Exceptions'].to_i()
|
364
|
-
totals['Test Major Exceptions'] +=
|
365
|
-
rpt['report_hash']['Test Major Exceptions'].to_i()
|
366
828
|
totals['Test Count'] += rpt['report_hash']['Test Count'].to_i()
|
367
829
|
totals['Test Skip Count'] += rpt['report_hash']['Test Skip Count'].to_i()
|
368
830
|
|
@@ -378,17 +840,6 @@ HTML
|
|
378
840
|
end
|
379
841
|
hours,minutes,seconds,frac = Date.day_fraction_to_time(time_diff)
|
380
842
|
|
381
|
-
rpt['report_hash'].each do |k,v|
|
382
|
-
if ( (v.to_i > 0) && (k !~ /test\s+assert\s+count/i) &&
|
383
|
-
(k !~ /test\s+event\s+count/i) &&
|
384
|
-
(k !~ /css\s+error\s+count/i) &&
|
385
|
-
(k !~ /test\s+count/i))
|
386
|
-
tmp = '<font color="#FF0000"><b>'
|
387
|
-
tmp += "#{v}</b></font>"
|
388
|
-
rpt['report_hash'][k] = tmp
|
389
|
-
end
|
390
|
-
end
|
391
|
-
|
392
843
|
report_file = File.basename(rpt['log_file'], ".log")
|
393
844
|
report_file = "Report-#{report_file}.html"
|
394
845
|
|
@@ -403,59 +854,126 @@ HTML
|
|
403
854
|
log_file_td = "#{rpt['test_file']}"
|
404
855
|
end
|
405
856
|
|
406
|
-
|
857
|
+
rpt['report_hash'].each do |k,v|
|
858
|
+
rpt['report_hash'][k] = v.to_i()
|
859
|
+
end
|
860
|
+
|
861
|
+
test_run_class = "td_run_data"
|
862
|
+
if (rpt['report_hash']['Test Failure Count'] > 0)
|
863
|
+
test_run_class = "td_run_data_error"
|
864
|
+
end
|
865
|
+
|
866
|
+
rpt['report_hash']['Test Other Failures'] = 0
|
867
|
+
total_failures = 0
|
868
|
+
total_failures += rpt['report_hash']['Test Failure Count']
|
869
|
+
total_failures += rpt['report_hash']['Test WatchDog Count']
|
870
|
+
total_failures += rpt['report_hash']['Test Assert Failures']
|
871
|
+
total_failures += rpt['report_hash']['Test Other Failures']
|
872
|
+
total_failures += rpt['report_hash']['Test JavaScript Error Count']
|
873
|
+
totals['Total Failure Count'] += total_failures
|
874
|
+
|
875
|
+
tcount = 0
|
876
|
+
tcount += rpt['report_hash']['Test Count']
|
877
|
+
tcount += rpt['report_hash']['Test Blocked Count']
|
878
|
+
tcount += rpt['report_hash']['Test Skip Count']
|
879
|
+
|
880
|
+
exceptions_td = "td_exceptions_data"
|
881
|
+
if (rpt['report_hash']['Test Exceptions'] > 0)
|
882
|
+
exceptions_td = "td_exceptions_error_data"
|
883
|
+
end
|
884
|
+
|
885
|
+
asserts_td = "td_assert_data"
|
886
|
+
if (rpt['report_hash']['Test Assert Failures'] > 0)
|
887
|
+
asserts_td = "td_assert_error_data"
|
888
|
+
end
|
889
|
+
|
890
|
+
watchdog_td = "td_watchdog_data"
|
891
|
+
if (rpt['report_hash']['Test WatchDog Count'] > 0)
|
892
|
+
watchdog_td = "td_watchdog_error_data"
|
893
|
+
end
|
894
|
+
|
895
|
+
jscript_td = "td_javascript_data"
|
896
|
+
if (rpt['report_hash']['Test JavaScript Error Count'] > 0)
|
897
|
+
jscript_td = "td_javascript_error_data"
|
898
|
+
end
|
899
|
+
|
900
|
+
t_passedcount = rpt['report_hash']['Test Count']
|
901
|
+
t_passedcount -= rpt['report_hash']['Test Failure Count']
|
902
|
+
|
903
|
+
str = "<tr class=\"unhighlight\" "+
|
407
904
|
"onMouseOver=\"this.className='highlight'\" "+
|
408
|
-
"onMouseOut=\"this.className='
|
409
|
-
"\t<td class=\"
|
410
|
-
"\t<td
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
"\t<td
|
415
|
-
|
416
|
-
"\t<td
|
417
|
-
|
418
|
-
"\t<td
|
419
|
-
|
420
|
-
|
905
|
+
"onMouseOut=\"this.className='unhighlight'\">\n"+
|
906
|
+
"\t<td class=\"td_file_data\">#{log_file_td}</td>\n"+
|
907
|
+
"\t<td class=\"#{test_run_class}\">"+
|
908
|
+
"#{t_passedcount}/#{tcount}</td>\n"+
|
909
|
+
"\t<td class=\"td_passed_data\">"+
|
910
|
+
"#{rpt['report_hash']['Test Passed Count']}</td>\n"+
|
911
|
+
"\t<td class=\"td_failed_data\">"+
|
912
|
+
"#{rpt['report_hash']['Test Failure Count']}</td>\n"+
|
913
|
+
"\t<td class=\"td_blocked_data\">"+
|
914
|
+
"#{rpt['report_hash']['Test Blocked Count']}</td>\n"+
|
915
|
+
"\t<td class=\"td_skipped_data\">"+
|
916
|
+
"#{rpt['report_hash']['Test Skip Count']}</td>\n"+
|
917
|
+
"\t<td class=\"#{watchdog_td}\">"+
|
918
|
+
"#{rpt['report_hash']['Test WatchDog Count']}</td>\n"+
|
919
|
+
"\t<td class=\"#{exceptions_td}\">"+
|
920
|
+
"#{rpt['report_hash']['Test Exceptions']}</td>\n"+
|
921
|
+
"\t<td class=\"#{jscript_td}\">"+
|
922
|
+
"#{rpt['report_hash']['Test JavaScript Error Count']}</td>\n"+
|
923
|
+
"\t<td class=\"#{asserts_td}\">"+
|
924
|
+
"#{rpt['report_hash']['Test Assert Failures']}</td>\n"+
|
925
|
+
"\t<td class=\"td_other_data\">"+
|
926
|
+
"#{rpt['report_hash']['Test Other Failures']}</td>\n"+
|
927
|
+
"\t<td class=\"td_total_data\">#{total_failures}</td>\n"+
|
928
|
+
"\t<td class=\"td_css_data\">"+
|
929
|
+
"#{rpt['report_hash']['Test CSS Error Count']}</td>\n"+
|
930
|
+
"\t<td class=\"td_sodawarnings_data\">"+
|
931
|
+
"#{rpt['report_hash']['Test Warning Count']}</td>\n"+
|
932
|
+
"\t<td class=\"td_time_data\">"+
|
933
|
+
"#{hours}:#{minutes}:#{seconds}</td>\n</tr>\n"
|
421
934
|
fd.write(str)
|
422
935
|
end
|
423
936
|
|
424
937
|
hours,minutes,seconds,frac =
|
425
938
|
Date.day_fraction_to_time(totals['running_time'])
|
426
939
|
|
427
|
-
totals.each do |k,v|
|
428
|
-
if ( (v.to_i > 0) && (k !~ /test\s+assert\s+count/i) &&
|
429
|
-
(k !~ /test\s+event\s+count/i) &&
|
430
|
-
(k !~ /css\s+error\s+count/i) &&
|
431
|
-
(k !~ /test\s+count/i) )
|
432
|
-
|
433
|
-
tmp = '<font color="#FF0000"><b>'
|
434
|
-
tmp += "#{v}</b></font>"
|
435
|
-
totals[k] = tmp
|
436
|
-
end
|
437
|
-
end
|
438
|
-
|
439
940
|
totals['Test Skip Count'] = totals['Test Skip Count'].to_i()
|
440
|
-
test_totals = totals['Test Count']
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
"\t<td
|
447
|
-
"\t<td>#{totals['Test
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
941
|
+
test_totals = totals['Test Count']
|
942
|
+
test_totals += totals['Test Skip Count']
|
943
|
+
test_totals += totals['Test Blocked Count']
|
944
|
+
|
945
|
+
|
946
|
+
sub_totals = "<tr>\n"+
|
947
|
+
"\t<td class=\"td_header_master\">Totals:</td>\n"+
|
948
|
+
"\t<td class=\"td_footer_run\">#{totals['Test Count']}"+
|
949
|
+
"/#{test_totals}</td>\n"+
|
950
|
+
"\t<td class=\"td_footer_passed\">#{totals['Test Passed Count']}"+
|
951
|
+
"</td>\n"+
|
952
|
+
"\t<td class=\"td_footer_failed\">"+
|
953
|
+
"#{totals['Test Failure Count']}</td>\n"+
|
954
|
+
"\t<td class=\"td_footer_blocked\">"+
|
955
|
+
"#{totals['Test Blocked Count']}</td>\n"+
|
956
|
+
"\t<td class=\"td_footer_skipped\">"+
|
957
|
+
"#{totals['Test Skip Count']}</td>\n"+
|
958
|
+
"\t<td class=\"td_footer_watchdog\">"+
|
959
|
+
"#{totals['Test WatchDog Count']}</td>\n"+
|
960
|
+
"\t<td class=\"td_footer_exceptions\">"+
|
961
|
+
"#{totals['Test Exceptions']}</td>\n"+
|
962
|
+
"\t<td class=\"td_footer_javascript\">"+
|
963
|
+
"#{totals['Test JavaScript Error Count']}</td>\n"+
|
964
|
+
"\t<td class=\"td_footer_assert\">"+
|
965
|
+
"#{totals['Test Assert Failures']}</td>\n"+
|
966
|
+
"\t<td class=\"td_footer_other\">"+
|
967
|
+
"#{totals['Test Other Failures']}\n"+
|
968
|
+
"\t<td class=\"td_footer_total\">"+
|
969
|
+
"#{totals['Total Failure Count']}</td>\n"+
|
970
|
+
"\t<td class=\"td_footer_css\">"+
|
971
|
+
"#{totals['Test CSS Error Count']}</td>\n"+
|
972
|
+
"\t<td class=\"td_footer_sodawarnings\">"+
|
973
|
+
"#{totals['Test Warning Count']}</td>\n"+
|
974
|
+
"\t<td class=\"td_footer_times\">"+
|
975
|
+
"#{hours}:#{minutes}:#{seconds}</td>\n"+
|
976
|
+
"</tr>\n"
|
459
977
|
fd.write(sub_totals)
|
460
978
|
fd.write("</table>\n</body>\n</html>\n")
|
461
979
|
fd.close()
|
data/lib/SodaReporter.rb
CHANGED
@@ -54,11 +54,16 @@ class SodaReporter
|
|
54
54
|
@js_error_count = 0
|
55
55
|
@css_error_count = 0
|
56
56
|
@asserts_count = 0
|
57
|
-
@exception_major_count = 0
|
58
57
|
@assertFails_count = 0
|
59
58
|
@exception_count = 0
|
60
59
|
@test_count = 0
|
61
60
|
@test_skip_count = 0
|
61
|
+
@test_blocked_count = 0
|
62
|
+
@test_failed_count = 0
|
63
|
+
@test_passed_count = 0
|
64
|
+
@test_watchdog_count = 0
|
65
|
+
@test_warning_count = 0
|
66
|
+
@test_total_count = 0
|
62
67
|
@fatals = 0
|
63
68
|
@total = 0
|
64
69
|
@failureCount = 0
|
@@ -144,6 +149,54 @@ class SodaReporter
|
|
144
149
|
end
|
145
150
|
public :IncSkippedTest
|
146
151
|
|
152
|
+
###############################################################################
|
153
|
+
# IncTestTotalCount -- Method
|
154
|
+
# This method incerments the count by 1 for tests that were skipped.
|
155
|
+
#
|
156
|
+
# Input:
|
157
|
+
# n: the number to inc by, 1 is the default.
|
158
|
+
#
|
159
|
+
# Output:
|
160
|
+
# None.
|
161
|
+
#
|
162
|
+
###############################################################################
|
163
|
+
def IncTestTotalCount(n = 1)
|
164
|
+
@test_total_count += 1
|
165
|
+
end
|
166
|
+
public :IncTestTotalCount
|
167
|
+
|
168
|
+
###############################################################################
|
169
|
+
# IncBlockedTest -- Method
|
170
|
+
# This method incerments the count by 1 for tests that were blocked.
|
171
|
+
#
|
172
|
+
# Input:
|
173
|
+
# None.
|
174
|
+
#
|
175
|
+
# Output:
|
176
|
+
# None.
|
177
|
+
#
|
178
|
+
###############################################################################
|
179
|
+
def IncBlockedTest()
|
180
|
+
@test_blocked_count += 1
|
181
|
+
end
|
182
|
+
public :IncBlockedTest
|
183
|
+
|
184
|
+
###############################################################################
|
185
|
+
# IncFailedTest -- Method
|
186
|
+
# This method incerments the count by 1 for tests that failed.
|
187
|
+
#
|
188
|
+
# Input:
|
189
|
+
# None.
|
190
|
+
#
|
191
|
+
# Output:
|
192
|
+
# None.
|
193
|
+
#
|
194
|
+
###############################################################################
|
195
|
+
def IncFailedTest()
|
196
|
+
@test_failed_count += 1
|
197
|
+
end
|
198
|
+
public :IncFailedTest
|
199
|
+
|
147
200
|
###############################################################################
|
148
201
|
# IncTestCount -- Method
|
149
202
|
# This method incerments the count by 1 for tests that were ran
|
@@ -160,6 +213,54 @@ class SodaReporter
|
|
160
213
|
end
|
161
214
|
public :IncTestCount
|
162
215
|
|
216
|
+
###############################################################################
|
217
|
+
# IncTestWarningCount -- Method
|
218
|
+
# This method incerments the count by 1 for tests that were ran
|
219
|
+
#
|
220
|
+
# Input:
|
221
|
+
# None.
|
222
|
+
#
|
223
|
+
# Output:
|
224
|
+
# None.
|
225
|
+
#
|
226
|
+
###############################################################################
|
227
|
+
def IncTestWarningCount()
|
228
|
+
@test_warning_count += 1
|
229
|
+
end
|
230
|
+
public :IncTestWarningCount
|
231
|
+
|
232
|
+
###############################################################################
|
233
|
+
# IncTestPassedCount -- Method
|
234
|
+
# This method incerments the count by 1 for tests that passed.
|
235
|
+
#
|
236
|
+
# Input:
|
237
|
+
# None.
|
238
|
+
#
|
239
|
+
# Output:
|
240
|
+
# None.
|
241
|
+
#
|
242
|
+
###############################################################################
|
243
|
+
def IncTestPassedCount()
|
244
|
+
@test_passed_count += 1
|
245
|
+
end
|
246
|
+
public :IncTestPassedCount
|
247
|
+
|
248
|
+
###############################################################################
|
249
|
+
# IncTestWatchDogCount -- Method
|
250
|
+
# This method incerments the count by 1 for tests that watchdog'd.
|
251
|
+
#
|
252
|
+
# Input:
|
253
|
+
# None.
|
254
|
+
#
|
255
|
+
# Output:
|
256
|
+
# None.
|
257
|
+
#
|
258
|
+
###############################################################################
|
259
|
+
def IncTestWatchDogCount()
|
260
|
+
@test_watchdog_count += 1
|
261
|
+
end
|
262
|
+
public :IncTestWatchDogCount
|
263
|
+
|
163
264
|
###############################################################################
|
164
265
|
# ReportHTML -- Method
|
165
266
|
# This function will generate an html report from the raw soda log file.
|
@@ -323,9 +424,6 @@ class SodaReporter
|
|
323
424
|
#
|
324
425
|
# Params:
|
325
426
|
# sodaException: This is the exception that is passed from Soda.
|
326
|
-
#
|
327
|
-
# mojor: Tells use if this was a mojor exception or now.
|
328
|
-
#
|
329
427
|
# file: The soda test file that the exception was raised by durring the
|
330
428
|
# test.
|
331
429
|
#
|
@@ -338,7 +436,7 @@ class SodaReporter
|
|
338
436
|
# So I will be killer this param soon...
|
339
437
|
#
|
340
438
|
###############################################################################
|
341
|
-
def ReportException(sodaException,
|
439
|
+
def ReportException(sodaException, file = false)
|
342
440
|
msg = nil
|
343
441
|
@exception_count += 1
|
344
442
|
|
@@ -354,14 +452,11 @@ class SodaReporter
|
|
354
452
|
log("Exception raised: #{msg}\n", SodaUtils::ERROR)
|
355
453
|
end
|
356
454
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
log("Major exception raised for file: #{file}" + btm + bt,
|
363
|
-
SodaUtils::ERROR)
|
364
|
-
end
|
455
|
+
bt = "--Exception Backtrace: " + sodaException.backtrace.join("--") +
|
456
|
+
"\n"
|
457
|
+
btm = "--Exception Message: #{msg}\n"
|
458
|
+
log("Exception raised for file: #{file}" + btm + bt,
|
459
|
+
SodaUtils::ERROR)
|
365
460
|
end
|
366
461
|
|
367
462
|
###############################################################################
|
@@ -456,9 +551,13 @@ class SodaReporter
|
|
456
551
|
"--Test Event Count:#{@total}" +
|
457
552
|
"--Test Assert Count:#{@asserts_count}" +
|
458
553
|
"--Test Exceptions:#{@exception_count}" +
|
459
|
-
"--Test Major Exceptions: #{@exception_major_count}" +
|
460
554
|
"--Test Count:#{@test_count}" +
|
461
|
-
"--Test Skip Count:#{@test_skip_count}
|
555
|
+
"--Test Skip Count:#{@test_skip_count}" +
|
556
|
+
"--Test Blocked Count:#{@test_blocked_count}" +
|
557
|
+
"--Test Failed Count:#{@test_failed_count}" +
|
558
|
+
"--Test Passed Count:#{@test_passed_count}" +
|
559
|
+
"--Test WatchDog Count:#{@test_watchdog_count}"+
|
560
|
+
"--Test Warning Count:#{@test_warning_count}\n"
|
462
561
|
log(msg)
|
463
562
|
end
|
464
563
|
|
data/lib/SodaUtils.rb
CHANGED
@@ -487,7 +487,8 @@ def SodaUtils.ConvertOldBrowserClose(event, reportobj, testfile)
|
|
487
487
|
"=\"true\" /> Test file: \"#{testfile}\", Line: "+
|
488
488
|
"#{event['line_number']}!\n",
|
489
489
|
SodaUtils::WARN)
|
490
|
-
|
490
|
+
reportobj.IncTestWarningCount()
|
491
|
+
reportobj.log("Use <browser action=\"close\" />.\n")
|
491
492
|
end
|
492
493
|
|
493
494
|
return event
|
@@ -523,9 +524,10 @@ def SodaUtils.ConvertOldAssert(event, reportobj, testfile)
|
|
523
524
|
"< assert=\"something\" exist=\"false\" />" +
|
524
525
|
" Test file: \"#{testfile}\", Line: #{event['line_number']}\n."
|
525
526
|
reportobj.log(msg, SodaUtils::WARN)
|
527
|
+
reportobj.IncTestWarningCount()
|
526
528
|
|
527
529
|
msg = "Use: < assertnot=\"something\" />\n"
|
528
|
-
reportobj.log(msg
|
530
|
+
reportobj.log(msg)
|
529
531
|
|
530
532
|
event.delete('exist')
|
531
533
|
event.delete('assert')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Trampus Richmond
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-10 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|