testability-driver 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@
17
17
  {
18
18
  padding: 10px;
19
19
  border: #e7e7e7 1px solid;
20
- background: #74C2E1;
20
+ background: #ffffff;
21
21
  color: black;
22
22
  font-size: 13px;
23
23
  cursor: default;
@@ -332,6 +332,15 @@
332
332
  text-align: center;
333
333
 
334
334
  }
335
+
336
+ a.toc_item2
337
+ {
338
+
339
+ font-size: 11px;
340
+ text-decoration: none;
341
+ color: #313131;
342
+
343
+ }
335
344
 
336
345
  a.toc_item:hover
337
346
  {
@@ -339,6 +348,13 @@
339
348
  border-bottom: 1px dotted #515151;
340
349
 
341
350
  }
351
+
352
+ a.toc_item2:hover
353
+ {
354
+
355
+ border-bottom: 1px dotted #515151;
356
+
357
+ }
342
358
 
343
359
 
344
360
  a.jump_to
@@ -422,7 +438,38 @@
422
438
  </xsl:template>
423
439
 
424
440
  <xsl:template match="documentation">
441
+ <!-- table of contents -->
442
+ <br />
443
+
444
+
425
445
 
446
+ <xsl:for-each select="feature/@name">
447
+
448
+ <xsl:sort select="." />
449
+
450
+ <!---
451
+
452
+ file:///home/jussi/git/2010-10-07/driver/lib/output/example.xml#QT;TestObject;activate
453
+
454
+ -->
455
+
456
+ <xsl:variable name="name"><xsl:value-of select="../@name"/></xsl:variable>
457
+ <xsl:variable name="module"><xsl:value-of select="../behaviour/@module"/></xsl:variable>
458
+ <xsl:variable name="module_name"><xsl:value-of select="../behaviour/@name"/></xsl:variable>
459
+
460
+ <xsl:for-each select="str:split(.,';')">
461
+ <span class="toc_block"><a href="#{ $module_name }:{ $name }" class="toc_item2" title="{ $module_name } ({ $module })"><xsl:value-of select="." /></a><xsl:text> </xsl:text></span>
462
+ </xsl:for-each>
463
+
464
+ <xsl:text> </xsl:text>
465
+
466
+ </xsl:for-each>
467
+
468
+
469
+ <br />
470
+
471
+ <!-- content -->
472
+
426
473
  <!-- table of contents -->
427
474
  <center>
428
475
  <span class="toc_title">Table of contents:</span>
@@ -88,11 +88,13 @@ module MobyBehaviour
88
88
  raise BehaviourError.new("reboot", "switchbox_sleep_after_powerup_in_reboot could not be converted to integer")
89
89
  end
90
90
 
91
- power_down
92
91
  begin
93
92
  disconnect
94
93
  rescue
95
94
  end
95
+
96
+ power_down
97
+
96
98
  sleep sleep_time_before_powerup
97
99
  power_up
98
100
  sleep sleep_time_after_powerup
@@ -52,12 +52,24 @@ module TDriverReportCreator
52
52
  $tdriver_reporter.set_total_run(0)
53
53
  $tdriver_reporter.update_summary_page('inprogress')
54
54
  $tdriver_reporter.update_environment_page()
55
- at_exit {
55
+ at_exit {
56
56
  while $run_status_thread_active == true
57
57
  sleep 1
58
58
  end
59
+ if $new_test_case!=nil
60
+ if $new_test_case.test_case_ended==false
61
+ end_test_case($new_test_case.test_case_name,'not_run')
62
+ end
63
+ end
59
64
  puts 'Generating report summary...'
60
- $tdriver_reporter.update_summary_page('finished')
65
+ exit_status=''
66
+
67
+ exit_status << "Stderr:#{$stderr}<hr/>"
68
+ exit_status << "Stdout:#{$stdout}<hr/>"
69
+ exit_status << "Exit command:#{$!}<br/>"
70
+ exit_status << "Backtrace:#{$@}"
71
+
72
+ $tdriver_reporter.update_summary_page('finished',exit_status)
61
73
  puts 'Summary generated...'
62
74
  puts 'Generating total run table...'
63
75
  $tdriver_reporter.update_test_case_summary_pages('all')
@@ -89,7 +101,7 @@ module TDriverReportCreator
89
101
  puts 'Junit generated...'
90
102
  #$tdriver_reporter.delete_result_storage()
91
103
  $tdriver_reporter.disconnect_connected_devices()
92
- #tdriver_log_page $tdriver_reporter.update_tdriver_log_page()
104
+ $tdriver_reporter.update_tdriver_log_page()
93
105
  puts 'Report generated to:'
94
106
  puts $tdriver_reporter.report_folder()
95
107
  clean_video_files
@@ -116,6 +128,9 @@ module TDriverReportCreator
116
128
  # === raises
117
129
  def error_in_connection_detected
118
130
  error_in_connection if $parameters[ :custom_error_recovery_module, nil ]!=nil
131
+ $tdriver_reporter.connection_errors+=1 if $tdriver_reporter
132
+ $new_test_case.connection_errors+=1 if $new_test_case
133
+ $new_test_case.set_test_case_execution_log('<b style="color: #FF0000">WARNING: Connection error detected!</b>') if $new_test_case
119
134
  end
120
135
  #This method returns the group where the test case belongs
121
136
  #
@@ -181,8 +196,9 @@ module TDriverReportCreator
181
196
  $new_test_case.test_case_total_dump_count,
182
197
  $new_test_case.test_case_total_data_sent,
183
198
  $new_test_case.test_case_total_data_received,
184
- $new_test_case.test_case_user_data,
185
- $new_test_case.test_case_user_data_columns
199
+ $new_test_case.test_case_user_data,
200
+ $new_test_case.test_case_user_data_columns,
201
+ $new_test_case.connection_errors
186
202
  )
187
203
 
188
204
  $tdriver_reporter.test_case_user_xml_data=Hash.new
@@ -203,7 +219,7 @@ module TDriverReportCreator
203
219
  $tdriver_reporter.update_test_case_summary_pages('statistics')
204
220
  $tdriver_reporter.group_results_by_test_case()
205
221
  $new_junit_xml_results.create_junit_xml()
206
- #tdriver_log_page $tdriver_reporter.update_tdriver_log_page()
222
+ $tdriver_reporter.update_tdriver_log_page()
207
223
  #ML: Update summary every 10 seconds improves performance during execution
208
224
  sleep 10
209
225
  $run_status_thread_active=false
@@ -346,7 +362,7 @@ module TDriverReportCreator
346
362
  if $new_test_case==nil
347
363
  @_stored_details << details
348
364
  else
349
- if @_stored_details!=[]
365
+ if @_stored_details!=[] && @_stored_details!=nil
350
366
  @_stored_details.each do |detail|
351
367
  $new_test_case.set_test_case_execution_log(detail)
352
368
  end
@@ -401,19 +417,7 @@ module TDriverReportCreator
401
417
  begin
402
418
  create_test_case_folder($tdriver_reporter.fail_statuses.first)
403
419
  $new_test_case.capture_dump()
404
- if $new_test_case.video_recording?
405
- $new_test_case.copy_video_capture()
406
- end
407
420
  error_in_test_case(TDriver::SUTFactory.connected_suts) if $parameters[ :custom_error_recovery_module, nil ]!=nil
408
- begin
409
-
410
- error_in_connection_detected
411
-
412
- rescue Exception => e
413
- update_test_case("Error recovery failed Exception: #{e.message} Backtrace: #{e.backtrace}")
414
- end_test_case($new_test_case.test_case_name,'failed')
415
- exit(1)
416
- end
417
421
  rescue => ex
418
422
  puts ex.message
419
423
  puts ex.backtrace
@@ -453,7 +457,8 @@ module TDriverReportCreator
453
457
  if $new_test_case.test_case_logging_level.to_i > 0
454
458
  $tdriver_report_log_output.string.each do |line|
455
459
  $new_test_case.set_test_case_behaviour_log(line,nil)
456
- #tdriver_log_page $tdriver_reporter.set_test_run_behaviour_log(line,full_tc_name)
460
+ $tdriver_reporter.set_test_run_behaviour_log(line,$new_test_case.test_case_name_full) if $new_test_case.report_short_folders=='false'
461
+ $tdriver_reporter.set_test_run_behaviour_log(line,"#{$new_test_case.test_case_status}_#{$new_test_case.test_case_index}") if $new_test_case.report_short_folders=='true'
457
462
  end
458
463
  end
459
464
  end
@@ -544,6 +549,9 @@ module TDriverReportCreator
544
549
  if found_crash_files.to_i > 0
545
550
  $new_test_case.capture_crash_files()
546
551
  end
552
+ if $new_test_case.video_recording?
553
+ $new_test_case.copy_video_capture()
554
+ end
547
555
  end
548
556
  if(status=='passed')
549
557
 
@@ -48,13 +48,14 @@ class ReportingStatistics
48
48
  end
49
49
  @total_statistics_arr << ["reboots",0]
50
50
  @total_statistics_arr << ["crashes",0]
51
+ @total_statistics_arr << ["connection_errors",0]
51
52
  @total_statistics_arr << ["duration",0]
52
53
  @total_statistics_arr << ["dump count",0]
53
54
  @total_statistics_arr << ["sent bytes",0]
54
55
  @total_statistics_arr << ["received bytes",0]
55
56
  @total_statistics_arr << ["used mem",0]
56
57
  @total_statistics_arr << ["pass rate",0]
57
- @all_statuses << "reboots" << "crashes" << "duration" << "dump count" << "sent bytes" << "received bytes" << "used mem" << "pass rate"
58
+ @all_statuses << "reboots" << "crashes" << "connection_errors" << "duration" << "dump count" << "sent bytes" << "received bytes" << "used mem" << "pass rate"
58
59
  end
59
60
 
60
61
  def generate_statistics_headers()
@@ -70,6 +71,7 @@ class ReportingStatistics
70
71
  end
71
72
  status_heads << "<th abbr=\"link_column\"><b>Reboots</b></th>"
72
73
  status_heads << "<th abbr=\"link_column\"><b>Crashes</b></th>"
74
+ status_heads << "<th abbr=\"link_column\"><b>Connection Errors</b></th>"
73
75
  status_heads << "<th abbr=\"link_column\"><b>Duration</b></th>"
74
76
  status_heads << "<th abbr=\"link_column\"><b>Dump count</b></th>"
75
77
  status_heads << "<th abbr=\"link_column\"><b>Sent bytes</b></th>"
@@ -79,7 +81,7 @@ class ReportingStatistics
79
81
  status_heads
80
82
  end
81
83
 
82
- def update_total_execution_statistics(tc_status,reboots,crashes,dump_count,sent_bytes,received_bytes,memory_usage)
84
+ def update_total_execution_statistics(tc_status,reboots,crashes,connection_errors,dump_count,sent_bytes,received_bytes,memory_usage)
83
85
  current_index=0
84
86
  @total_statistics_arr.each do |total_status|
85
87
  if tc_status==total_status[0]
@@ -91,6 +93,9 @@ class ReportingStatistics
91
93
  if total_status[0]=="crashes"
92
94
  @total_statistics_arr[current_index]=["crashes",total_status[1].to_i+crashes.to_i]
93
95
  end
96
+ if total_status[0]=="connection_errors"
97
+ @total_statistics_arr[current_index]=["connection_errors",total_status[1].to_i+connection_errors.to_i]
98
+ end
94
99
  if total_status[0]=="total"
95
100
  @total_statistics_arr[current_index]=["total",total_status[1].to_i+1]
96
101
  end
@@ -116,7 +121,7 @@ class ReportingStatistics
116
121
  end
117
122
  end
118
123
 
119
- def update_test_case_execution_statistics(tc_name,tc_status,tc_execution,duration,tc_link,reboots,crashes,dump_count,sent_bytes,received_bytes,memory_usage)
124
+ def update_test_case_execution_statistics(tc_name,tc_status,tc_execution,duration,tc_link,reboots,crashes,connection_errors,dump_count,sent_bytes,received_bytes,memory_usage)
120
125
  b_test_in_statistics=false
121
126
  current_index=0
122
127
  total_run=0
@@ -138,6 +143,10 @@ class ReportingStatistics
138
143
  b_test_in_statistics=true
139
144
  @statistics_arr[current_index]=[tc_name,"crashes",total_status[2].to_i+crashes.to_i,tc_execution,tc_link]
140
145
  end
146
+ if total_status[1]=="connection_errors" && total_status[0]==tc_name
147
+ b_test_in_statistics=true
148
+ @statistics_arr[current_index]=[tc_name,"connection_errors",total_status[2].to_i+connection_errors.to_i,tc_execution,tc_link]
149
+ end
141
150
  if total_status[1]=="total" && total_status[0]==tc_name
142
151
  b_test_in_statistics=true
143
152
  @statistics_arr[current_index]=[tc_name,"total",total_status[2].to_i+1,tc_execution,tc_link]
@@ -202,16 +211,17 @@ class ReportingStatistics
202
211
  sent_bytes=test_case[14].to_i
203
212
  received_bytes=test_case[15].to_i
204
213
  memory_usage=test_case[6].to_i
214
+ connection_errors=test_case[16].to_i
205
215
 
206
216
  duration=test_case[5].to_f
207
217
  total_duration = total_duration + duration
208
218
  b_test_in_statistics=false
209
219
 
210
220
  #Update total statistics
211
- update_total_execution_statistics(tc_status,reboots,crashes,dump_count,sent_bytes,received_bytes,memory_usage)
221
+ update_total_execution_statistics(tc_status,reboots,crashes,connection_errors,dump_count,sent_bytes,received_bytes,memory_usage)
212
222
 
213
223
  #Update current test case total statistics
214
- b_test_in_statistics=update_test_case_execution_statistics(tc_name,tc_status,tc_execution,duration,tc_link,reboots,crashes,dump_count,sent_bytes,received_bytes,memory_usage)
224
+ b_test_in_statistics=update_test_case_execution_statistics(tc_name,tc_status,tc_execution,duration,tc_link,reboots,crashes,connection_errors,dump_count,sent_bytes,received_bytes,memory_usage)
215
225
 
216
226
  if b_test_in_statistics==false
217
227
  total_run=0
@@ -226,6 +236,8 @@ class ReportingStatistics
226
236
  @statistics_arr << [tc_name,"reboots",reboots.to_i,tc_execution,tc_link]
227
237
  elsif status=="crashes"
228
238
  @statistics_arr << [tc_name,"crashes",crashes.to_i,tc_execution,tc_link]
239
+ elsif status=="connection_errors"
240
+ @statistics_arr << [tc_name,"connection_errors",connection_errors.to_i,tc_execution,tc_link]
229
241
  elsif status=="total"
230
242
  total_run=1
231
243
  @statistics_arr << [tc_name,"total",1,tc_execution,tc_link]
@@ -274,6 +286,7 @@ class ReportingStatistics
274
286
  tc_link='<a href="cases/'+result_page.to_i.to_s+'_chronological_total_run_index.html">'
275
287
  tc_link='<a href="cases/1_reboot_index.html">' if status=="reboots" && total>0
276
288
  tc_link='<a href="cases/1_crash_index.html">' if status=="crashes" && total>0
289
+ tc_link='<a href="cases/1_connection_errors_index.html">' if status=="connection_errors" && total>0
277
290
  tc_link='<a href="cases/1_'+@pass_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @pass_statuses.include?(status) && total>0
278
291
  tc_link='<a href="cases/1_'+@fail_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @fail_statuses.include?(status) && total>0
279
292
  tc_link='<a href="cases/1_'+@not_run_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @not_run_statuses.include?(status) && total>0
@@ -281,6 +294,7 @@ class ReportingStatistics
281
294
  tc_link='<a href="'+result_page.to_i.to_s+'_chronological_total_run_index.html">'
282
295
  tc_link='<a href="1_reboot_index.html">' if status=="reboots" && total>0
283
296
  tc_link='<a href="1_crash_index.html">' if status=="crashes" && total>0
297
+ tc_link='<a href="1_connection_errors_index.html">' if status=="connection_errors" && total>0
284
298
  tc_link='<a href="1_'+@pass_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @pass_statuses.include?(status) && total>0
285
299
  tc_link='<a href="1_'+@fail_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @fail_statuses.include?(status) && total>0
286
300
  tc_link='<a href="1_'+@not_run_statuses.first.gsub(' ','_')+'_'+test_case.gsub(' ','_')+'_index.html">' if @not_run_statuses.include?(status) && total>0
@@ -67,7 +67,9 @@ module TDriverReportCreator
67
67
  :fail_statuses,
68
68
  :not_run_statuses,
69
69
  :test_case_logging_level,
70
- :trace_directory
70
+ :trace_directory,
71
+ :connection_errors,
72
+ :report_short_folders
71
73
  )
72
74
  def initialize()
73
75
  @test_case_folder=nil
@@ -88,6 +90,7 @@ module TDriverReportCreator
88
90
  @failed_dump_error=nil
89
91
  @test_case_reboots=0
90
92
  @test_case_crash_files=0
93
+ @connection_errors=0
91
94
  @test_case_behaviour_log = Array.new
92
95
  @failed_screenshot=nil
93
96
  @test_case_group=nil
@@ -123,7 +126,8 @@ module TDriverReportCreator
123
126
  rescue
124
127
  end
125
128
  o = Log4r::IOOutputter.new("io",$tdriver_report_log_output)
126
- MobyUtil::Logger.instance.add_outputter(logger_instance, o)
129
+ MobyUtil::Logger.instance.set_outputter_pattern(o, $parameters[ :logging_outputter_pattern, '%d [%c] [%l] %M' ])
130
+ MobyUtil::Logger.instance.add_outputter(logger_instance, o)
127
131
  end
128
132
  end
129
133
  rescue
@@ -59,8 +59,9 @@ module TDriverReportCreator
59
59
  :not_run_statuses,
60
60
  :report_editable,
61
61
  :test_fails,
62
- :report_exclude_passed_cases
63
-
62
+ :report_exclude_passed_cases,
63
+ :connection_errors
64
+
64
65
  )
65
66
  #class variables for summary report
66
67
  def initialize()
@@ -76,6 +77,7 @@ module TDriverReportCreator
76
77
  @total_not_run=0
77
78
  @total_crash_files=0
78
79
  @total_device_resets=0
80
+ @connection_errors=0
79
81
  @test_case_user_defined_status=nil
80
82
  @test_run_behaviour_log = Array.new
81
83
  @test_run_user_log = Array.new
@@ -512,8 +514,8 @@ module TDriverReportCreator
512
514
  write_page_end(@report_folder+'/cases/1_not_run_index.html')
513
515
  write_page_start(@report_folder+'/cases/1_total_run_index.html','Total run')
514
516
  write_page_end(@report_folder+'/cases/1_total_run_index.html')
515
- #write_page_start(@report_folder+'/cases/tdriver_log_index.html','TDriver log')
516
- #write_page_end(@report_folder+'/cases/tdriver_log_index.html')
517
+ write_page_start(@report_folder+'/cases/tdriver_log_index.html','TDriver log')
518
+ write_page_end(@report_folder+'/cases/tdriver_log_index.html')
517
519
  write_page_start(@report_folder+'/cases/statistics_index.html','Statistics')
518
520
  write_page_end(@report_folder+'/cases/statistics_index.html')
519
521
  if $parameters[ :report_generate_rdoc, 'false' ]=='true'
@@ -563,20 +565,25 @@ module TDriverReportCreator
563
565
  # === returns
564
566
  # nil
565
567
  # === raises
566
- def update_summary_page(status)
568
+ def update_summary_page(status,exit_trace=nil)
567
569
  begin
568
570
  #Calculate run time
569
571
  @run_time=Time.now-@start_time
570
572
  if status=='inprogress'
571
573
  write_page_start(@report_folder+'/index.html','TDriver test results')
572
- write_summary_body(@report_folder+'/index.html',@start_time,'Tests Ongoing...',@run_time,@total_run,@total_passed,@total_failed,@total_not_run,@total_crash_files,@total_device_resets)
574
+ write_summary_body(@report_folder+'/index.html',@start_time,'Tests Ongoing...',@run_time,@total_run,@total_passed,@total_failed,@total_not_run,@total_crash_files,@total_device_resets,@connection_errors)
573
575
  write_page_end(@report_folder+'/index.html')
574
576
  else
575
577
  all_cases_arr=read_result_storage('all')
576
578
  write_page_start(@report_folder+'/index.html','TDriver test results')
577
- write_summary_body(@report_folder+'/index.html',@start_time,@end_time,@run_time,@total_run,@total_passed,@total_failed,@total_not_run,@total_crash_files,@total_device_resets,all_cases_arr)
579
+ write_summary_body(@report_folder+'/index.html',@start_time,@end_time,@run_time,@total_run,@total_passed,@total_failed,@total_not_run,@total_crash_files,@total_device_resets,@connection_errors,all_cases_arr)
578
580
  write_page_end(@report_folder+'/index.html')
579
581
  end
582
+ if exit_trace
583
+ write_page_start(@report_folder+'/exit.html','TDriver test results')
584
+ write_exit_body(@report_folder+'/exit.html',exit_trace,@report_folder)
585
+ write_page_end(@report_folder+'/exit.html')
586
+ end
580
587
  rescue Exception => e
581
588
  raise e, "Unable to update summary page", e.backtrace
582
589
  end
@@ -866,7 +873,8 @@ module TDriverReportCreator
866
873
  total_sent=0,
867
874
  total_received=0,
868
875
  user_data_rows=nil,
869
- user_data_columns=nil)
876
+ user_data_columns=nil,
877
+ connection_errors=0)
870
878
 
871
879
  while $result_storage_in_use==true
872
880
  sleep 1
@@ -915,6 +923,8 @@ module TDriverReportCreator
915
923
  test_comment.content = comment
916
924
  test_link = Nokogiri::XML::Node.new("link",test)
917
925
  test_link.content = html_link
926
+ test_connection_errors = Nokogiri::XML::Node.new("connection_errors",test)
927
+ test_connection_errors.content = connection_errors
918
928
  test_dump_count = Nokogiri::XML::Node.new("dump_count",test)
919
929
  test_dump_count.content = calculate_total_values_from_hash(total_dump)
920
930
  test_sent_bytes = Nokogiri::XML::Node.new("sent_bytes",test)
@@ -934,6 +944,7 @@ module TDriverReportCreator
934
944
  test << test_log
935
945
  test << test_comment
936
946
  test << test_link
947
+ test << test_connection_errors
937
948
  test << test_dump_count
938
949
  test << test_sent_bytes
939
950
  test << test_received_bytes
@@ -1005,6 +1016,7 @@ module TDriverReportCreator
1005
1016
  xml.log log
1006
1017
  xml.comment comment
1007
1018
  xml.link html_link
1019
+ xml.connection_errors connection_errors
1008
1020
  xml.dump_count calculate_total_values_from_hash(total_dump)
1009
1021
  xml.sent_bytes calculate_total_values_from_hash(total_sent)
1010
1022
  xml.received_bytes calculate_total_values_from_hash(total_received)
@@ -1144,7 +1156,9 @@ module TDriverReportCreator
1144
1156
  nodes=xml_data.root.xpath("//tests/test[crashes>0]")
1145
1157
  elsif results=='reboot'
1146
1158
  nodes=xml_data.root.xpath("//tests/test[reboots>0]")
1147
- elsif results!='all' && results!='crash' && results!='reboot'
1159
+ elsif results=='connection_errors'
1160
+ nodes=xml_data.root.xpath("//tests/test[connection_errors>0]")
1161
+ elsif results!='all' && results!='crash' && results!='reboot' && results!='connection_errors'
1148
1162
  case results
1149
1163
  when 'passed'
1150
1164
 
@@ -1184,6 +1198,7 @@ module TDriverReportCreator
1184
1198
  dump_count=node.search("dump_count").text #12
1185
1199
  sent_bytes=node.search("sent_bytes").text #13
1186
1200
  received_bytes=node.search("received_bytes").text #14
1201
+ connection_errors=node.search("connection_errors").text #15
1187
1202
  user_data = Hash.new
1188
1203
  node.xpath("user_display_data/data").each do |data_node|
1189
1204
  value_name = data_node.get_attribute("id")
@@ -1206,7 +1221,8 @@ module TDriverReportCreator
1206
1221
  user_data,
1207
1222
  dump_count,
1208
1223
  sent_bytes,
1209
- received_bytes
1224
+ received_bytes,
1225
+ connection_errors
1210
1226
  ]
1211
1227
 
1212
1228
  result_storage << current_record
@@ -1354,7 +1370,7 @@ module TDriverReportCreator
1354
1370
  @all_cases_arr=read_result_storage('all')
1355
1371
  write_page_start(@report_folder+'/cases/statistics_index.html','Statistics')
1356
1372
  write_test_case_summary_body(@report_folder+'/cases/statistics_index.html','statistics',@all_cases_arr)
1357
- write_duration_graph(@report_folder+'/cases/statistics_index.html', @report_folder, 'duration_graph.png', @all_cases_arr) if @duration_graph!=false
1373
+ write_duration_graph(@report_folder+'/cases/statistics_index.html', @report_folder, 'duration_graph.png', @all_cases_arr) if @duration_graph=='true'
1358
1374
  write_page_end(@report_folder+'/cases/statistics_index.html')
1359
1375
  when 'all'
1360
1376
  @all_cases_arr=read_result_storage(status)
@@ -1382,7 +1398,8 @@ module TDriverReportCreator
1382
1398
  @all_cases_arr=nil
1383
1399
  update_test_case_summary_pages_for_crashes_and_reboots(rewrite)
1384
1400
  rescue Exception => e
1385
- raise e, "Unable to update test case summary pages", caller
1401
+ puts e.backtrace
1402
+ raise e, "Unable to update test case summary pages", caller
1386
1403
  end
1387
1404
  return nil
1388
1405
  end
@@ -1392,6 +1409,7 @@ module TDriverReportCreator
1392
1409
  begin
1393
1410
  update_test_case_summary_page('crash',rewrite,'Crash')
1394
1411
  update_test_case_summary_page('reboot',rewrite,'Reboot')
1412
+ update_test_case_summary_page('connection_errors',rewrite,'Connection Errors')
1395
1413
  rescue Exception => e
1396
1414
  raise e, "Unable to update test case summary pages for crashes and reboots", caller
1397
1415
  end
@@ -626,6 +626,7 @@ display: block;
626
626
  formatted_log=log_row[0].gsub('PASS;','')
627
627
  formatted_log=formatted_log.gsub('FAIL;','')
628
628
  formatted_log=formatted_log.gsub('BEHAVIOUR TDriver:','')
629
+ formatted_log=formatted_log.gsub('[TDriver] [BEHAVIOUR]','')
629
630
  formatted_log=formatted_log.gsub('WARNING;','')
630
631
  formatted_log=formatted_log.gsub('DEBUG TDriver:','')
631
632
  formatted_log=formatted_log.gsub('INFO TDriver:','')
@@ -672,7 +673,7 @@ display: block;
672
673
  case title
673
674
  when "TDriver test results"
674
675
  stylesheet='<link rel="stylesheet" title="TDriverReportStyle" href="tdriver_report_style.css"/>'
675
- when "TDriver test environment","Total run","Statistics","Passed","Failed","Not run","Crash","Reboot","TDriver log"
676
+ when "TDriver test environment","Total run","Statistics","Passed","Failed","Not run","Crash","Reboot","Connection Errors", "TDriver log"
676
677
  stylesheet='<link rel="stylesheet" title="TDriverReportStyle" href="../tdriver_report_style.css"/>'
677
678
  else
678
679
  if title.include?("Test:")
@@ -1028,6 +1029,20 @@ display: block;
1028
1029
  html_body << '<form action="save_results_to" ><input type="submit" name="save_results_to" value="Download report" /></form>' if @report_editable=='true'
1029
1030
  tdriver_group=nil
1030
1031
  html_result=nil
1032
+ when 'connection_errors'
1033
+ title='<div class="page_title"><center><h1>Connection Errors</h1></center></div>'<<
1034
+ '<div class="summary_reboot">' <<
1035
+ '<form action="save_total_run_results" >'
1036
+ tdriver_group=ReportingGroups.new(@reporting_groups,tc_arr,false)
1037
+ tdriver_group.parse_groups()
1038
+ html_result=tdriver_group.generate_report('all')
1039
+ html_body << title
1040
+ html_body << html_result
1041
+ html_body << "<input type=\"submit\" name=\"save_changes\" value=\"Save changes\" />" if @report_editable=='true'
1042
+ html_body << "</form>"
1043
+ html_body << '<form action="save_results_to" ><input type="submit" name="save_results_to" value="Download report" /></form>' if @report_editable=='true'
1044
+ tdriver_group=nil
1045
+ html_result=nil
1031
1046
  when 'statistics'
1032
1047
  title='<div class="page_title"><center><h1>Statistics</h1></center></div>'<<
1033
1048
  '<div class="statistics">'
@@ -1085,7 +1100,7 @@ display: block;
1085
1100
 
1086
1101
  end
1087
1102
 
1088
- def write_summary_body(page,start_time,end_time,run_time,total_run,total_passed,total_failed,total_not_run,total_crash_files,total_device_resets,summary_arr=nil)
1103
+ def write_summary_body(page,start_time,end_time,run_time,total_run,total_passed,total_failed,total_not_run,total_crash_files,total_device_resets,connection_errors,summary_arr=nil)
1089
1104
  fail_rate="0"
1090
1105
  pass_rate="0"
1091
1106
  if total_run.to_i > total_not_run.to_i
@@ -1107,7 +1122,7 @@ display: block;
1107
1122
  '<td>'+start_time.strftime("%d.%m.%Y %H:%M:%S")+'</td>'<<
1108
1123
  '</tr>'<<
1109
1124
  '<tr>'<<
1110
- '<td><b>Ended</b></td>'
1125
+ '<td><a href="exit.html"><b>Ended</b></a></td>'
1111
1126
  begin
1112
1127
  html_body+='<td>'+end_time.strftime("%d.%m.%Y %H:%M:%S")+'</td>'
1113
1128
  rescue
@@ -1141,6 +1156,10 @@ display: block;
1141
1156
  '<tr>'<<
1142
1157
  '<td><b>Total device resets</b></td>'<<
1143
1158
  '<td>'+total_device_resets.to_s+'</td>'<<
1159
+ '</tr>'<<
1160
+ '<tr>'<<
1161
+ '<td><b>Total connection errors</b></td>'<<
1162
+ '<td>'+connection_errors.to_s+'</td>'<<
1144
1163
  '</tr>'
1145
1164
  if $parameters[ :report_generate_rdoc, 'false' ]=='true'
1146
1165
  html_body << '<tr>'<<
@@ -1273,6 +1292,18 @@ display: block;
1273
1292
  end
1274
1293
  html_body=nil
1275
1294
  end
1295
+
1296
+ def write_exit_body(page,exit_log,folder)
1297
+
1298
+ html_body='<div class="page_title"><center><h1>TDriver execution exit trace</h1></center></div>'<<
1299
+ "<div class=\"environment\">#{format_execution_log(exit_log,folder.to_s)}</div>"
1300
+ create_behaviour_links()
1301
+ File.open(page, 'a') do |f2|
1302
+ f2.puts html_body
1303
+ end
1304
+ html_body=nil
1305
+ end
1306
+
1276
1307
  def write_tdriver_log_body(page,log)
1277
1308
  if log.length > 0
1278
1309
  log_summary=behaviour_log_summary(log,'array')
@@ -1347,7 +1378,7 @@ display: block;
1347
1378
  passed_link="#{report_page}_passed_index.html\" class=\"current\""
1348
1379
  failed_link="1_failed_index.html\""
1349
1380
  not_run_link="1_not_run_index.html\""
1350
- when "Failed","Crash","Reboot"
1381
+ when "Failed","Crash","Reboot", "Connection Errors"
1351
1382
  tdriver_test_results_link='../index.html"'
1352
1383
  tdriver_test_environment_link='../environment/index.html"'
1353
1384
  tdriver_log_link='tdriver_log_index.html"'
@@ -1369,11 +1400,11 @@ display: block;
1369
1400
  tdriver_test_results_link='../index.html"'
1370
1401
  tdriver_test_environment_link='../environment/index.html"'
1371
1402
  tdriver_log_link='tdriver_log_index.html" class="current"'
1372
- total_run_link="#{report_page}_total_run_index.html\""
1403
+ total_run_link="1_total_run_index.html\""
1373
1404
  statistics_link='statistics_index.html"'
1374
- passed_link="#{report_page}_passed_index.html\""
1375
- failed_link="#{report_page}_failed_index.html\""
1376
- not_run_link="#{report_page}_not_run_index.html\""
1405
+ passed_link="1_passed_index.html\""
1406
+ failed_link="1_failed_index.html\""
1407
+ not_run_link="1_not_run_index.html\""
1377
1408
  else
1378
1409
  if title.include?("Test:")
1379
1410
  tdriver_test_results_link='../index.html"'
@@ -1407,6 +1438,9 @@ display: block;
1407
1438
  statistics_link<<
1408
1439
  '>Statistics</a></li>'<<
1409
1440
  '<li><a href="'<<
1441
+ tdriver_log_link<<
1442
+ '>Log</a></li>'<<
1443
+ '<li><a href="'<<
1410
1444
  total_run_link<<
1411
1445
  '>Total run</a></li>'<<
1412
1446
  '<li><a href="'<<
@@ -561,7 +561,9 @@ module MobyUtil
561
561
 
562
562
  log( *exit_status )
563
563
 
564
- rescue
564
+ rescue Exception => ex
565
+ puts ex.message
566
+ puts ex.backtrace
565
567
 
566
568
  end
567
569
 
@@ -18,4 +18,4 @@
18
18
  ############################################################################
19
19
 
20
20
 
21
- ENV['TDRIVER_VERSION'] = '1.5.1'
21
+ ENV['TDRIVER_VERSION'] = '1.5.2'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testability-driver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 1
10
- version: 1.5.1
9
+ - 2
10
+ version: 1.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Testability Driver team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin/
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-16 00:00:00 +02:00
18
+ date: 2012-04-02 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency