soda 1.4.1 → 1.4.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.
- data/lib/SodaLogReporter.rb +12 -12
- data/lib/SodaReporter.rb +23 -8
- data/lib/SodaUtils.rb +3 -2
- data/lib/sodainfo.rb +1 -1
- metadata +4 -4
data/lib/SodaLogReporter.rb
CHANGED
@@ -241,7 +241,7 @@ HTML
|
|
241
241
|
def FormatTestResults (line)
|
242
242
|
row_data = Hash.new()
|
243
243
|
table_html = "<table>\n"
|
244
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
244
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
245
245
|
row_data['date'] = "#{$1}"
|
246
246
|
row_data['msg_type'] = "Results"
|
247
247
|
rpt_msg = "#{$3}"
|
@@ -341,7 +341,7 @@ HTML
|
|
341
341
|
def FormatHTMLSavedResults (line)
|
342
342
|
row_data = Hash.new()
|
343
343
|
|
344
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
344
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
345
345
|
row_data['date'] = "#{$1}"
|
346
346
|
row_data['msg_type'] = "#{$2}"
|
347
347
|
sav_msg = "#{$3}"
|
@@ -412,7 +412,7 @@ HTML
|
|
412
412
|
def FormatMajorException(line)
|
413
413
|
row_data = Hash.new()
|
414
414
|
|
415
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
415
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
416
416
|
row_data['date'] = "#{$1}"
|
417
417
|
row_data['msg_type'] = "#{$2}"
|
418
418
|
msg = "#{$3}"
|
@@ -446,7 +446,7 @@ HTML
|
|
446
446
|
def FormatAssertionFailed (line)
|
447
447
|
row_data = Hash.new()
|
448
448
|
|
449
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
449
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
450
450
|
row_data['date'] = "#{$1}"
|
451
451
|
row_data['msg_type'] = "#{$2}"
|
452
452
|
msg = "#{$3}"
|
@@ -492,7 +492,7 @@ HTML
|
|
492
492
|
def FormatAssertionPassed (line)
|
493
493
|
row_data = Hash.new()
|
494
494
|
|
495
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
495
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
496
496
|
row_data['date'] = "#{$1}"
|
497
497
|
row_data['msg_type'] = "AP"
|
498
498
|
msg = "#{$3}"
|
@@ -517,7 +517,7 @@ HTML
|
|
517
517
|
href_id = "href_div_ed_#{@EventDumpID}"
|
518
518
|
@EventDumpID += 1
|
519
519
|
row_data = Hash.new()
|
520
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
520
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
521
521
|
row_data['date'] = "#{$1}"
|
522
522
|
row_data['msg_type'] = "#{$2}"
|
523
523
|
msg = "#{$3}"
|
@@ -560,7 +560,7 @@ HTML
|
|
560
560
|
###############################################################################
|
561
561
|
def FormatJSError(line)
|
562
562
|
row_data = Hash.new()
|
563
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
563
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
564
564
|
row_data['date'] = "#{$1}"
|
565
565
|
row_data['msg_type'] = "#{$2}"
|
566
566
|
msg = "#{$3}"
|
@@ -594,7 +594,7 @@ HTML
|
|
594
594
|
###############################################################################
|
595
595
|
def FormatModuleLine(type, line)
|
596
596
|
row_data = Hash.new()
|
597
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
597
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
598
598
|
row_data['date'] = "#{$1}"
|
599
599
|
row_data['msg_type'] = "M"
|
600
600
|
msg = "#{$3}"
|
@@ -628,7 +628,7 @@ HTML
|
|
628
628
|
###############################################################################
|
629
629
|
def FormatScreenShot(line)
|
630
630
|
row_data = Hash.new()
|
631
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
631
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
632
632
|
row_data['date'] = "#{$1}"
|
633
633
|
row_data['msg_type'] = "#{$2}"
|
634
634
|
msg = "#{$3}"
|
@@ -661,7 +661,7 @@ HTML
|
|
661
661
|
row_data = Hash.new()
|
662
662
|
msg = ""
|
663
663
|
|
664
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
664
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
665
665
|
row_data['date'] = "#{$1}"
|
666
666
|
row_data['msg_type'] = "#{$2}"
|
667
667
|
|
@@ -694,7 +694,7 @@ HTML
|
|
694
694
|
def FormatClickingElement(line)
|
695
695
|
row_data = {}
|
696
696
|
tmp = ""
|
697
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
697
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
698
698
|
row_data['date'] = "#{$1}"
|
699
699
|
row_data['msg_type'] = "#{$2}"
|
700
700
|
tmp = "#{$3}"
|
@@ -760,7 +760,7 @@ HTML
|
|
760
760
|
when /screenshot\staken/i
|
761
761
|
row_data = FormatScreenShot(line)
|
762
762
|
else
|
763
|
-
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+)\](\(.\))(.*)/
|
763
|
+
line =~ /\[(\d+\/\d+\/\d+-\d+:\d+:\d+\.\d+)\](\(.\))(.*)/
|
764
764
|
row_data['date'] = "#{$1}"
|
765
765
|
row_data['msg_type'] = "#{$2}"
|
766
766
|
row_data['msg'] = SafeHTMLStr("#{$3}")
|
data/lib/SodaReporter.rb
CHANGED
@@ -56,6 +56,8 @@ class SodaReporter
|
|
56
56
|
@debug = debug
|
57
57
|
@start_time = nil
|
58
58
|
@end_time = nil
|
59
|
+
@start_time_obj = nil
|
60
|
+
@end_time_obj = nil
|
59
61
|
@js_error_count = 0
|
60
62
|
@css_error_count = 0
|
61
63
|
@asserts_count = 0
|
@@ -128,7 +130,14 @@ class SodaReporter
|
|
128
130
|
log("[New Test]\n")
|
129
131
|
log("Starting soda test: #{@sodatest_file}\n")
|
130
132
|
log("Saving HTML files => #{@saveHtmlFiles.to_s()}.\n")
|
131
|
-
|
133
|
+
|
134
|
+
# this is because ruby 1.8.7 strftime doesn't support fractions of a
|
135
|
+
# second. Lame...
|
136
|
+
now = Time.now()
|
137
|
+
@start_time_obj = now
|
138
|
+
time_str = now.strftime("%m/%d/%Y-%H:%M:%S")
|
139
|
+
time_str = "#{time_str}.#{now.usec}"
|
140
|
+
@start_time = time_str
|
132
141
|
end
|
133
142
|
|
134
143
|
###############################################################################
|
@@ -144,12 +153,14 @@ class SodaReporter
|
|
144
153
|
###############################################################################
|
145
154
|
def GetRawResults()
|
146
155
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
"
|
152
|
-
|
156
|
+
if (@end_time == nil)
|
157
|
+
now = Time.now()
|
158
|
+
@end_time_obj = now
|
159
|
+
@end_time = now.strftime("%m/%d/%Y-%H:%M:%S")
|
160
|
+
@end_time = "#{@end_time}.#{now.usec}"
|
161
|
+
end
|
162
|
+
|
163
|
+
total_time = (@end_time_obj - @start_time_obj)
|
153
164
|
|
154
165
|
results = {
|
155
166
|
'Test Failure Count' => @failureCount,
|
@@ -472,7 +483,11 @@ class SodaReporter
|
|
472
483
|
log("Soda test: #{@sodatest_file} finished.\n")
|
473
484
|
log("[End Test]\n")
|
474
485
|
@logfile.close()
|
475
|
-
|
486
|
+
|
487
|
+
now = Time.now()
|
488
|
+
now_str = now.strftime("%m/%d/%Y-%H:%M:%S")
|
489
|
+
@end_time_obj = now
|
490
|
+
@end_time = "#{now_str}.#{now.usec}"
|
476
491
|
end
|
477
492
|
|
478
493
|
###############################################################################
|
data/lib/SodaUtils.rb
CHANGED
@@ -159,8 +159,9 @@ def SodaUtils.PrintSoda (str, error = 0, file = nil, debug = 0, notime = 0,
|
|
159
159
|
stackmsg = ""
|
160
160
|
now = nil
|
161
161
|
|
162
|
-
now = Time.now()
|
163
|
-
|
162
|
+
now = Time.now()
|
163
|
+
time_str = now.strftime("%m/%d/%Y-%H:%M:%S")
|
164
|
+
header = "[#{time_str}.#{now.usec}]"
|
164
165
|
|
165
166
|
if (debug != 0)
|
166
167
|
cstak = caller()
|
data/lib/sodainfo.rb
CHANGED
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: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 2
|
10
|
+
version: 1.4.2
|
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: 2011-05-
|
18
|
+
date: 2011-05-10 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: firewatir
|