testability-driver 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/config/sut_parameters.rb +21 -8
  2. data/config/tdriver_custom_error_recovery.rb +83 -0
  3. data/ext/extconf.rb +3 -2
  4. data/ext/native_extensions.c +60 -2
  5. data/lib/tdriver-devtools/behaviour/old/xml/example/flick-example.rb +2 -105
  6. data/lib/tdriver/base/behaviour/factory.rb +154 -89
  7. data/lib/tdriver/base/behaviour/factory_new.rb +409 -0
  8. data/lib/tdriver/base/errors.rb +3 -3
  9. data/lib/tdriver/base/state_object.rb +85 -22
  10. data/lib/tdriver/base/sut/adapter.rb +26 -0
  11. data/lib/tdriver/base/sut/controller.rb +1 -1
  12. data/lib/tdriver/base/sut/generic/behaviours/application.rb +89 -118
  13. data/lib/tdriver/base/sut/generic/behaviours/find.rb +67 -62
  14. data/lib/tdriver/base/sut/generic/behaviours/sut.rb +296 -187
  15. data/lib/tdriver/base/sut/generic/behaviours/switchbox_behaviour.rb +7 -7
  16. data/lib/tdriver/base/sut/generic/commands/application.rb +366 -295
  17. data/lib/tdriver/base/sut/sut.rb +19 -3
  18. data/lib/tdriver/base/test_object/abstract.rb +41 -21
  19. data/lib/tdriver/base/test_object/adapter.rb +62 -9
  20. data/lib/tdriver/base/test_object/behaviours/syncronization.rb +10 -6
  21. data/lib/tdriver/base/test_object/behaviours/test_object.rb +84 -47
  22. data/lib/tdriver/base/test_object/factory.rb +124 -68
  23. data/lib/tdriver/base/test_object/loader.rb +3 -4
  24. data/lib/tdriver/base/test_object/verification.rb +3 -3
  25. data/lib/tdriver/base/test_object/xml/adapter.rb +734 -0
  26. data/lib/tdriver/loader.rb +12 -0
  27. data/lib/tdriver/report/error_recovery/tdriver_error_recovery.rb +3 -2
  28. data/lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb +14 -14
  29. data/lib/tdriver/report/report.rb +4 -8
  30. data/lib/tdriver/report/report_api.rb +9 -0
  31. data/lib/tdriver/report/report_crash_file_capture.rb +4 -4
  32. data/lib/tdriver/report/report_creator.rb +57 -35
  33. data/lib/tdriver/report/report_cucumber.rb +1 -1
  34. data/lib/tdriver/report/report_cucumber_listener.rb +5 -158
  35. data/lib/tdriver/report/report_cucumber_reporter.rb +7 -161
  36. data/lib/tdriver/report/report_execution_statistics.rb +4 -4
  37. data/lib/tdriver/report/report_file_capture.rb +5 -5
  38. data/lib/tdriver/report/report_grouping.rb +24 -22
  39. data/lib/tdriver/report/report_junit_xml.rb +5 -5
  40. data/lib/tdriver/report/report_test_case_run.rb +31 -22
  41. data/lib/tdriver/report/report_test_run.rb +107 -104
  42. data/lib/tdriver/report/report_writer.rb +150 -83
  43. data/lib/tdriver/tdriver.rb +147 -103
  44. data/lib/tdriver/util/common/boolean.rb +51 -0
  45. data/lib/tdriver/util/common/crc16.rb +110 -68
  46. data/lib/tdriver/util/common/hash.rb +63 -7
  47. data/lib/tdriver/util/common/kernel.rb +46 -1
  48. data/lib/tdriver/util/common/loader.rb +1 -0
  49. data/lib/tdriver/util/common/object.rb +20 -8
  50. data/lib/tdriver/util/common/string.rb +21 -2
  51. data/lib/tdriver/util/logger/logger.rb +4 -4
  52. data/lib/tdriver/util/parameter/loader.rb +2 -19
  53. data/lib/tdriver/util/parameter/parameter.rb +874 -177
  54. data/lib/tdriver/util/plugin/service.rb +1 -1
  55. data/lib/tdriver/util/recorder/recorder.rb +7 -1
  56. data/lib/tdriver/util/xml/abstraction.rb +13 -1
  57. data/lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb +63 -10
  58. data/lib/tdriver/util/xml/parsers/nokogiri/attribute.rb +8 -2
  59. data/lib/tdriver/util/xml/parsers/nokogiri/document.rb +16 -3
  60. data/lib/tdriver/util/xml/parsers/nokogiri/node.rb +36 -32
  61. data/lib/tdriver/util/xml/parsers/nokogiri/nodeset.rb +19 -22
  62. data/lib/tdriver/util/xml/xml.rb +147 -32
  63. data/lib/tdriver/verify/verify.rb +1112 -289
  64. data/lib/tdriver/version.rb +1 -1
  65. data/xml/templates/generic.xml +14 -2
  66. metadata +51 -24
  67. data/lib/tdriver/util/parameter/parameter_hash.rb +0 -104
  68. data/lib/tdriver/util/parameter/parameter_new.rb +0 -869
  69. data/lib/tdriver/util/parameter/parameter_template.rb +0 -120
  70. data/lib/tdriver/util/parameter/parameter_user_api.rb +0 -116
  71. data/lib/tdriver/util/parameter/parameter_xml.rb +0 -261
@@ -38,6 +38,7 @@ module TDriverReport
38
38
  @current_feature = nil
39
39
  @tc_status=nil
40
40
  @current_feature_group=nil
41
+ @current_feature_element_file=''
41
42
  end
42
43
  def after_features(features)
43
44
  end_test_case(@current_feature_element,@tc_status)
@@ -92,9 +93,8 @@ module TDriverReport
92
93
  def scenario_name(keyword, name, file_colon_line, source_indent)
93
94
  visit_feature_element_name(keyword, name, file_colon_line, source_indent)
94
95
  end
95
- def feature_name(keyword,name)
96
- @current_feature_group=keyword + " " + name.gsub(/[:]/,' ')
97
- add_report_group('Features:'+@current_feature_group+'|')
96
+ def feature_name(keyword,name)
97
+ @current_feature_group=keyword + " " + name.gsub(/[:]/,' ')
98
98
  end
99
99
  #This method determines when new test case needs to be started
100
100
  #based on the scenario name info if scenario name is different then a new test case
@@ -104,6 +104,8 @@ module TDriverReport
104
104
  # === returns
105
105
  # === raises
106
106
  def visit_feature_element_name(keyword, name, file_colon_line, source_indent)
107
+ add_report_group(File.basename(file_colon_line)+':'+@current_feature_group+'|')
108
+ @current_feature_element_file=file_colon_line
107
109
  line = %Q("#{name}")
108
110
  @current_feature_element=line if @current_feature_element.nil?
109
111
  unless line == @current_feature_element
@@ -112,6 +114,7 @@ module TDriverReport
112
114
  end
113
115
  start_test_case(@current_feature_element)
114
116
  add_test_case_group(@current_feature_group)
117
+ update_test_case(file_colon_line)
115
118
  @tc_status=nil
116
119
  end
117
120
  #This method records the cucumber outline table results in to one test case
@@ -161,7 +164,7 @@ module TDriverReport
161
164
  end
162
165
  def py_string(string)
163
166
  end
164
- def print_feature_element_name(keyword, name, file_colon_line, source_indent)
167
+ def print_feature_element_name(keyword, name, file_colon_line, source_indent)
165
168
  end
166
169
  def before_table_row(table_row)
167
170
  return unless @table
@@ -173,163 +176,6 @@ module TDriverReport
173
176
  end
174
177
  end
175
178
  end
176
-
177
- module MattiReport
178
- #Class for formatting cucumber report
179
- class CucumberReporter
180
- include TDriverReportCreator
181
- #This method initializes new test run
182
- #
183
- # === params
184
- # === returns
185
- # === raises
186
- def initialize(step_mother, io, options)
187
- file, line = caller.first.split(":")
188
- $stderr.puts "%s:%s warning: MattiReport deprecated, use TDriverReport instead" % [ file, line]
189
- #super(step_mother, io, options)
190
- start_run()
191
- @options = options
192
- @current_feature_element = nil
193
- @current_feature = nil
194
- @tc_status=nil
195
- @current_feature_group=nil
196
- end
197
- def after_features(features)
198
- end_test_case(@current_feature_element,@tc_status)
199
- end
200
- #This method visits the executed cucumber step and updates the results in to TDriver report
201
- #
202
- # === params
203
- # === returns
204
- # === raises
205
- def step_name(keyword, step_match, status, source_indent, background)
206
- if status == :passed
207
- step_name = step_match.format_args(lambda{|param| "*#{param}*"})
208
- update_test_case("#{step_name} PASSED")
209
- @tc_status='passed'
210
- end
211
- if status == :failed
212
- step_name = step_match.format_args(lambda{|param| "*#{param}*"})
213
- update_test_case("#{step_name} FAILED")
214
- @tc_status='failed'
215
- end
216
- if status == :skipped
217
- step_name = step_match.format_args(lambda{|param| "*#{param}*"})
218
- update_test_case("#{step_name} SKIPPED")
219
- end
220
- if status == :undefined
221
- step_name = step_match.format_args(lambda{|param| "*#{param}*"})
222
- update_test_case("#{step_name} NOT RUN")
223
- @tc_status='not run'
224
- end
225
- end
226
- #This method visits the exception caused by a failed step
227
- #and updates the result in to TDriver report
228
- #
229
- # === params
230
- # === returns
231
- # === raises
232
- def exception(exception, status)
233
- if status == :failed
234
- capture_screen_test_case()
235
- update_test_case(exception.message)
236
- update_test_case(exception.backtrace)
237
- end
238
- update_test_case('-') if status == :passed
239
- end
240
- #This method visits cucumber scenario name and starts a new test case when
241
- #new scenario is executed
242
- #and updates the result in to TDriver report
243
- #
244
- # === params
245
- # === returns
246
- # === raises
247
- def scenario_name(keyword, name, file_colon_line, source_indent)
248
- visit_feature_element_name(keyword, name, file_colon_line, source_indent)
249
- end
250
- def feature_name(keyword, name)
251
- @current_feature_group=keyword + " " + name
252
- add_report_group('Features:'+@current_feature_group+'|')
253
- end
254
- #This method determines when new test case needs to be started
255
- #based on the scenario name info if scenario name is different then a new test case
256
- #is started
257
- #
258
- # === params
259
- # === returns
260
- # === raises
261
- def visit_feature_element_name(keyword, name, file_colon_line, source_indent)
262
- line = %Q("#{name}")
263
- @current_feature_element=line if @current_feature_element.nil?
264
- unless line == @current_feature_element
265
- end_test_case(@current_feature_element,@tc_status)
266
- @current_feature_element=line
267
- end
268
- start_test_case(@current_feature_element)
269
- add_test_case_group(@current_feature_group)
270
- @tc_status=nil
271
- end
272
- #This method records the cucumber outline table results in to one test case
273
- #
274
- # === params
275
- # === returns
276
- # === raises
277
- def before_outline_table(outline_table)
278
- update_test_case("running outline: ")
279
- end
280
- #This method records the cucumber outline table results in to one test case
281
- #
282
- # === params
283
- # === returns
284
- # === raises
285
- def after_table_row(table_row)
286
- if table_row.exception
287
- @tc_status='failed'
288
- capture_screen_test_case()
289
- update_test_case("#{format_table_row(table_row)} FAILED")
290
- update_test_case(table_row.exception)
291
- else
292
- @tc_status='passed' if @tc_status==nil
293
- update_test_case("#{format_table_row(table_row)} PASSED")
294
- end
295
- end
296
- def format_table_row(row)
297
- begin
298
- [row.name, row.line]
299
- rescue Exception => e
300
- row
301
- end
302
- end
303
- def tag_name(tag_name)
304
- end
305
- def comment_line(comment_line)
306
- end
307
- def after_tags(tags)
308
- end
309
- def after_feature_element(feature_element)
310
- end
311
- def after_background(background)
312
- end
313
- def before_examples_array(examples_array)
314
- end
315
- def examples_name(keyword, name)
316
- end
317
- def py_string(string)
318
- end
319
- def print_feature_element_name(keyword, name, file_colon_line, source_indent)
320
- end
321
- def before_table_row(table_row)
322
- return unless @table
323
- @col_index = 0
324
- end
325
- def table_cell_value(value, status)
326
- return unless @table
327
- status ||= @status || :passed
328
- end
329
- end
330
- end
331
-
332
-
333
179
  rescue LoadError
334
180
 
335
181
  end
@@ -22,10 +22,10 @@ class ReportingStatistics
22
22
  def initialize(test_cases_array, summary=nil)
23
23
  @all_statuses=Array.new
24
24
  @group_test_case_arr=Array.new(test_cases_array)
25
- @pass_statuses=MobyUtil::Parameter[ :report_passed_statuses, "passed" ].split('|')
26
- @fail_statuses=MobyUtil::Parameter[ :report_failed_statuses, "failed" ].split('|')
27
- @not_run_statuses=MobyUtil::Parameter[ :report_not_run_statuses, "not run" ].split('|')
28
- @test_results_per_page=MobyUtil::Parameter[ :report_results_per_page, 50]
25
+ @pass_statuses= $parameters[ :report_passed_statuses, "passed" ].split('|')
26
+ @fail_statuses= $parameters[ :report_failed_statuses, "failed" ].split('|')
27
+ @not_run_statuses= $parameters[ :report_not_run_statuses, "not run" ].split('|')
28
+ @test_results_per_page= $parameters[ :report_results_per_page, 50]
29
29
  @statistics_arr=Array.new
30
30
  @total_statistics_arr=Array.new
31
31
  @summary=summary
@@ -37,11 +37,11 @@ module TDriverReportFileCapture
37
37
  end
38
38
 
39
39
  def read_file_monitor_settings()
40
- @file_locations=return_settings_value_array(MobyUtil::Parameter[ :report_file_locations, nil ])
41
- @file_suts=return_settings_value_array(MobyUtil::Parameter[ :report_file_monitored_sut_ids, nil ])
42
- @file_names=return_settings_value_array(MobyUtil::Parameter[ :report_file_names, nil ])
43
- @clean_files=MobyUtil::Parameter[ :report_clean_files_from_sut_after_capture, 'true' ]
44
- @monitor_files = MobyUtil::Parameter[ :report_file_monitor, 'false' ]
40
+ @file_locations=return_settings_value_array($parameters[ :report_file_locations, nil ])
41
+ @file_suts=return_settings_value_array($parameters[ :report_file_monitored_sut_ids, nil ])
42
+ @file_names=return_settings_value_array($parameters[ :report_file_names, nil ])
43
+ @clean_files=$parameters[ :report_clean_files_from_sut_after_capture, 'true' ]
44
+ @monitor_files = $parameters[ :report_file_monitor, 'false' ]
45
45
  end
46
46
 
47
47
  def clean_files_from_sut()
@@ -39,9 +39,9 @@ class ReportingGroups
39
39
  @main_not_run=0
40
40
  @group_test_case_arr=Array.new(test_cases_array)
41
41
  @grouping=grouping
42
- @pass_statuses=MobyUtil::Parameter[ :report_passed_statuses, "passed" ].split('|')
43
- @fail_statuses=MobyUtil::Parameter[ :report_failed_statuses, "failed" ].split('|')
44
- @not_run_statuses=MobyUtil::Parameter[ :report_not_run_statuses, "not run" ].split('|')
42
+ @pass_statuses= $parameters[ :report_passed_statuses, "passed" ].split('|')
43
+ @fail_statuses= $parameters[ :report_failed_statuses, "failed" ].split('|')
44
+ @not_run_statuses= $parameters[ :report_not_run_statuses, "not run" ].split('|')
45
45
  end
46
46
  def clean_reporting_groups(report_group_string)
47
47
  cleaned_group_string=''
@@ -453,15 +453,16 @@ class ReportingGroups
453
453
  table_body
454
454
  end
455
455
  def generate_report(status)
456
- html_body=Array.new
456
+ html_body=Array.new
457
457
  if @grouping==true
458
458
  @main_groups.each do |group|
459
459
  @main_total=0
460
460
  @main_passed=0
461
461
  @main_failed=0
462
462
  @main_not_run=0
463
- html_body << tog_list_begin(group,@group_test_case_arr,status,'main')
464
- html_body << generate_test_results_table(status,@group_test_case_arr,[group,group])
463
+ group_body=Array.new
464
+ group_body << tog_list_begin(group,@group_test_case_arr,status,'main')
465
+ group_body << generate_test_results_table(status,@group_test_case_arr,[group,group])
465
466
  tog_list1=0
466
467
  tog_list2=0
467
468
  tog_list3=0
@@ -472,61 +473,62 @@ class ReportingGroups
472
473
  if group.to_s == item1.at(0).to_s && @reporting_groups.include?(group.to_s+':'+item1.at(1).to_s)
473
474
  tog_list1=tog_list_begin(item1.at(1).to_s,@group_test_case_arr,status)
474
475
  if tog_list1 != 0
475
- html_body << tog_list1
476
- html_body << generate_test_results_table(status,@group_test_case_arr,item1)
476
+ group_body << tog_list1
477
+ group_body << generate_test_results_table(status,@group_test_case_arr,item1)
477
478
  end
478
479
  @main_groups_sub_level_two.each do |item2|
479
480
  if group.to_s == item2.at(0).to_s && @reporting_groups.include?(item1.at(1).to_s+':'+item2.at(1).to_s)
480
481
  tog_list2=tog_list_begin(item2.at(1).to_s,@group_test_case_arr,status)
481
482
  if tog_list2 != 0
482
- html_body << tog_list2
483
- html_body << generate_test_results_table(status,@group_test_case_arr,item2)
483
+ group_body << tog_list2
484
+ group_body << generate_test_results_table(status,@group_test_case_arr,item2)
484
485
  end
485
486
  @main_groups_sub_level_three.each do |item3|
486
487
  if group.to_s == item3.at(0).to_s && @reporting_groups.include?(item2.at(1).to_s+':'+item3.at(1).to_s)
487
488
  tog_list3=tog_list_begin(item3.at(1).to_s,@group_test_case_arr,status)
488
489
  if tog_list3 != 0
489
- html_body << tog_list3
490
- html_body << generate_test_results_table(status,@group_test_case_arr,item3)
490
+ group_body << tog_list3
491
+ group_body << generate_test_results_table(status,@group_test_case_arr,item3)
491
492
  end
492
493
  @main_groups_sub_level_four.each do |item4|
493
494
  if group.to_s == item4.at(0).to_s && @reporting_groups.include?(item3.at(1).to_s+':'+item4.at(1).to_s)
494
495
  tog_list4=tog_list_begin(item4.at(1).to_s,@group_test_case_arr,status)
495
496
  if tog_list4 != 0
496
- html_body << tog_list4
497
- html_body << generate_test_results_table(status,@group_test_case_arr,item4)
497
+ group_body << tog_list4
498
+ group_body << generate_test_results_table(status,@group_test_case_arr,item4)
498
499
  end
499
500
  @main_groups_sub_level_five.each do |item5|
500
501
  if group.to_s == item5.at(0).to_s && @reporting_groups.include?(item4.at(1).to_s+':'+item5.at(1).to_s)
501
502
  tog_list5=tog_list_begin(item5.at(1).to_s,@group_test_case_arr,status)
502
503
  if tog_list5 != 0
503
- html_body << tog_list5
504
- html_body << generate_test_results_table(status,@group_test_case_arr,item5)
505
- html_body << tog_list_end()
504
+ group_body << tog_list5
505
+ group_body << generate_test_results_table(status,@group_test_case_arr,item5)
506
+ group_body << tog_list_end()
506
507
  end
507
508
  end
508
509
  end
509
510
  if tog_list4 != 0
510
- html_body << tog_list_end()
511
+ group_body << tog_list_end()
511
512
  end
512
513
  end
513
514
  end
514
515
  if tog_list3 != 0
515
- html_body << tog_list_end()
516
+ group_body << tog_list_end()
516
517
  end
517
518
  end
518
519
  end
519
520
  if tog_list2 != 0
520
- html_body << tog_list_end()
521
+ group_body << tog_list_end()
521
522
  end
522
523
  end
523
524
  end
524
525
  if tog_list1 != 0
525
- html_body << tog_list_end()
526
+ group_body << tog_list_end()
526
527
  end
527
528
  end
528
529
  end
529
- html_body << tog_list_end('main')
530
+ group_body << tog_list_end('main')
531
+ html_body << group_body if @main_total > 0
530
532
  end
531
533
  html_body << generate_test_results_table(status,@group_test_case_arr,['not_in_any_user_defined_group','not_in_any_user_defined_group'])
532
534
  else
@@ -26,8 +26,8 @@ class ReportJUnitXml
26
26
  @test_case_arr=Array.new
27
27
  @test_run_properties_arr=Array.new
28
28
 
29
- @test_set_name=MobyUtil::Parameter[ :quality_center_testset_name, "TestSetName" ]
30
- @test_set_path =MobyUtil::Parameter[ :quality_center_testset_path, "TestSetPath" ]
29
+ @test_set_name=$parameters[ :quality_center_testset_name, "TestSetName" ]
30
+ @test_set_path =$parameters[ :quality_center_testset_path, "TestSetPath" ]
31
31
  @test_class_name=nil
32
32
  @junit_xml_filename = convert_to_file_name('tdriver_junit_xml')
33
33
  @failures = 0
@@ -37,9 +37,9 @@ class ReportJUnitXml
37
37
  @tests_start_time = Time.now
38
38
  @tc_start_time = nil
39
39
  @tc_end_time = nil
40
- @pass_statuses=MobyUtil::Parameter[ :report_passed_statuses, "passed" ].split('|')
41
- @fail_statuses=MobyUtil::Parameter[ :report_failed_statuses, "failed" ].split('|')
42
- @not_run_statuses=MobyUtil::Parameter[ :report_not_run_statuses, "not run" ].split('|')
40
+ @pass_statuses=$parameters[ :report_passed_statuses, "passed" ].split('|')
41
+ @fail_statuses=$parameters[ :report_failed_statuses, "failed" ].split('|')
42
+ @not_run_statuses=$parameters[ :report_not_run_statuses, "not run" ].split('|')
43
43
  end
44
44
  def convert_to_file_name(value)
45
45
  "TEST-"+value.gsub(/[^\w_\.]/, '_') + ".xml"
@@ -107,15 +107,15 @@ module TDriverReportCreator
107
107
  @test_case_data_sent_at_end=Hash.new
108
108
  @test_case_data_received_at_start=Hash.new
109
109
  @test_case_data_received_at_end=Hash.new
110
- @pass_statuses=MobyUtil::Parameter[ :report_passed_statuses, "passed" ].split('|')
111
- @fail_statuses=MobyUtil::Parameter[ :report_failed_statuses, "failed" ].split('|')
112
- @not_run_statuses=MobyUtil::Parameter[ :report_not_run_statuses, "not run" ].split('|')
113
- @test_case_logging_level = MobyUtil::Parameter[ :logging_level, nil ]
114
- @trace_directory=MobyUtil::Parameter[ :report_trace_folder, nil]
115
- @report_short_folders=MobyUtil::Parameter[ :report_short_folders, 'false']
110
+ @pass_statuses= $parameters[ :report_passed_statuses, "passed" ].split('|')
111
+ @fail_statuses= $parameters[ :report_failed_statuses, "failed" ].split('|')
112
+ @not_run_statuses= $parameters[ :report_not_run_statuses, "not run" ].split('|')
113
+ @test_case_logging_level = $parameters[ :logging_level, nil ]
114
+ @trace_directory= $parameters[ :report_trace_folder, nil]
115
+ @report_short_folders= $parameters[ :report_short_folders, 'false']
116
116
  $tdriver_report_log_output = StringIO.new ""
117
117
  begin
118
- if MobyUtil::Parameter[:behaviour_logging] == 'true'
118
+ if $parameters[:behaviour_logging] == 'true'
119
119
  if @test_case_logging_level.to_i > 0
120
120
  logger_instance = MobyUtil::Logger.instance.get_logger( 'TDriver' )
121
121
  begin
@@ -281,7 +281,16 @@ module TDriverReportCreator
281
281
  # === returns
282
282
  # nil
283
283
  # === raises
284
- def set_test_case_execution_log(value)
284
+ def repalce_chars_to_html_format(value)
285
+
286
+ formatted_line=value.to_s.gsub('<','&#60;')
287
+ formatted_line=formatted_line.gsub('>','&#62;')
288
+
289
+ formatted_line
290
+ end
291
+
292
+ def set_test_case_execution_log(value,format=false)
293
+ value=repalce_chars_to_html_format(value) if format==true
285
294
  @test_case_execution_log=@test_case_execution_log.to_s + '<br />' + value.to_s.gsub(/\n/,'<br />')
286
295
  end
287
296
  #This method sets the test case user data
@@ -331,17 +340,17 @@ module TDriverReportCreator
331
340
  tc_video_fps = 30
332
341
 
333
342
  begin
334
- tc_video_width = MobyUtil::Parameter[ :report_video_width ].to_i
343
+ tc_video_width = $parameters[ :report_video_width ].to_i
335
344
  rescue
336
345
  # parameter not loaded, do nothing
337
346
  end
338
347
  begin
339
- tc_video_height = MobyUtil::Parameter[ :report_video_height ].to_i
348
+ tc_video_height = $parameters[ :report_video_height ].to_i
340
349
  rescue
341
350
  # parameter not loaded, do nothing
342
351
  end
343
352
  begin
344
- tc_video_fps = MobyUtil::Parameter[ :report_video_fps ].to_i
353
+ tc_video_fps = $parameters[ :report_video_fps ].to_i
345
354
  rescue
346
355
  # parameter not loaded, do nothing
347
356
  end
@@ -376,9 +385,9 @@ module TDriverReportCreator
376
385
  ret = ""
377
386
  each_video_device do | video_device, device_index |
378
387
 
379
- check_fps = MobyUtil::Parameter[:report_activity_fps, '3']
380
- check_frame_min = MobyUtil::Parameter[:report_activity_frame_treshold, '8']
381
- check_video_min = MobyUtil::Parameter[:report_activity_video_treshold, '29']
388
+ check_fps = $parameters[:report_activity_fps, '3']
389
+ check_frame_min = $parameters[:report_activity_frame_treshold, '8']
390
+ check_video_min = $parameters[:report_activity_video_treshold, '29']
382
391
 
383
392
  ret_n = MobyUtil.video_alive? "cam_" + device_index + "_" + @tc_video_filename, check_fps.to_f, check_frame_min.to_f, check_video_min.to_f, false
384
393
 
@@ -547,10 +556,10 @@ module TDriverReportCreator
547
556
  '" target="_blank"><img alt="" src="state_xml/'<<
548
557
  time_stamp+'_'+sut_id.to_s+'_state.png'<<
549
558
  '" width="10%" height="10%" /></a>'
550
- if arguments[:text]
551
- image_html << "<div class=\"desc\">#{arguments[:text]}</div>"
552
- end
553
- image_html << '</div>'
559
+ if arguments[:text]
560
+ image_html << "<div class=\"desc\">#{arguments[:text]}</div>"
561
+ end
562
+ image_html << '</div>'
554
563
  self.set_test_case_execution_log(image_html.to_s)
555
564
  rescue Exception=>e
556
565
  @capture_screen_error="Unable to capture sceen image #{sut_id}: " + e.message
@@ -574,7 +583,7 @@ module TDriverReportCreator
574
583
  @capture_screen_error="Unable to capture state: " + e.message
575
584
  self.set_test_case_execution_log(@capture_screen_error.to_s)
576
585
  ensure
577
- if MobyUtil::Parameter[ :logging_level, 0 ].to_i > 0
586
+ if $parameters[ :logging_level, 0 ].to_i > 0
578
587
  MobyUtil::Logger.instance.enabled=true
579
588
  else
580
589
  MobyUtil::Logger.instance.enabled=false
@@ -590,8 +599,8 @@ module TDriverReportCreator
590
599
  # nil
591
600
  # === raises
592
601
  def capture_trace_files()
593
- if MobyUtil::Parameter[ :report_trace_capture, false]=="true"
594
- trace_folder=MobyUtil::Parameter[ :report_trace_folder, nil]
602
+ if $parameters[ :report_trace_capture, false]=="true"
603
+ trace_folder= $parameters[ :report_trace_folder, nil]
595
604
  if trace_folder!=nil
596
605
  if File::directory?(trace_folder)==true
597
606
  dump_folder=@test_case_folder+'/trace_files'
@@ -659,4 +668,4 @@ module TDriverReportCreator
659
668
  @tc_video_recording
660
669
  end
661
670
  end
662
- end
671
+ end