testability-driver-qt-sut-plugin 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/installer/extconf.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/action.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +174 -236
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/file_transfer.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fixture.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +73 -60
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +6 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/locale_db.rb +8 -8
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +348 -329
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/os.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/qt_api_method.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +9 -9
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/sut.rb +79 -27
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/webkit.rb +13 -11
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +70 -67
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/configure_command.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/find_object.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/fixture.rb +2 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/group.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/infologger_command.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/key_sequence.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/screen_capture.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/tap.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb +30 -14
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +8 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb +160 -29
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/communication.rb +6 -8
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/controller.rb +13 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/find_object_generator.rb +50 -35
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb +129 -95
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +4 -4
- data/xml/behaviour/qt.xml +8 -12
- metadata +53 -72
@@ -62,10 +62,10 @@ module MobyBehaviour
|
|
62
62
|
# @sut.execute_command(command)
|
63
63
|
# self.force_refresh
|
64
64
|
# rescue Exception => e
|
65
|
-
#
|
65
|
+
# $logger.log "behaviour" , "FAIL;Failed open_file with path \"#{path}\", dialog_name \"#{dialog_name}\", button \"#{button.to_s}\".;#{identity};open_file;"
|
66
66
|
# Kernel::raise e
|
67
67
|
# end
|
68
|
-
#
|
68
|
+
# $logger.log "behaviour" , "PASS;Operation file executed successfully with path \"#{path}\", dialog_name \"#{dialog_name}\", button \"#{button.to_s}\".;#{identity};open_file;"
|
69
69
|
# nil
|
70
70
|
# end
|
71
71
|
# Press Enter on the keyboard. Useful to accept crash warnings on windows
|
@@ -85,15 +85,15 @@ module MobyBehaviour
|
|
85
85
|
end
|
86
86
|
self.execute_command( MobyCommand::WidgetCommand.new( nil, nil, nil, 'PressEnter', params, nil, 'uiCommand') )
|
87
87
|
rescue Exception => e
|
88
|
-
|
88
|
+
$logger.log "behaviour" , "FAIL;Failed to send an Enter keystroke request to the qttas server;press_enter;"
|
89
89
|
Kernel::raise e
|
90
90
|
end
|
91
|
-
|
91
|
+
$logger.log "behaviour" , "PASS;Successfuly sent an Enter keystroke request to the qttas server;press_enter;"
|
92
92
|
nil
|
93
93
|
end
|
94
94
|
|
95
95
|
# enable hooking for performance measurement & debug logging
|
96
|
-
|
96
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
97
97
|
|
98
98
|
end
|
99
99
|
end
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/qt_api_method.rb
CHANGED
@@ -42,7 +42,7 @@ module MobyBehaviour
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# enable hooking for performance measurement & debug logging
|
45
|
-
|
45
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
46
46
|
|
47
47
|
end
|
48
48
|
|
@@ -127,7 +127,7 @@ module MobyBehaviour
|
|
127
127
|
end
|
128
128
|
|
129
129
|
# enable hooking for performance measurement & debug logging
|
130
|
-
|
130
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
131
131
|
|
132
132
|
end
|
133
133
|
|
@@ -139,7 +139,7 @@ module MobyBehaviour
|
|
139
139
|
end
|
140
140
|
|
141
141
|
# enable hooking for performance measurement & debug logging
|
142
|
-
|
142
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
143
143
|
|
144
144
|
end
|
145
145
|
|
@@ -62,12 +62,12 @@ module MobyBehaviour
|
|
62
62
|
|
63
63
|
rescue Exception => e
|
64
64
|
|
65
|
-
|
65
|
+
$logger.log "behaviour" , "FAIL;Failed start_recording.;#{ identity };start_recording;"
|
66
66
|
Kernel::raise e
|
67
67
|
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
$logger.log "behaviour" , "PASS;Operation start_recording executed successfully.;#{ identity };start_recording;"
|
71
71
|
|
72
72
|
nil
|
73
73
|
end
|
@@ -88,12 +88,12 @@ module MobyBehaviour
|
|
88
88
|
|
89
89
|
rescue Exception => e
|
90
90
|
|
91
|
-
|
91
|
+
$logger.log "behaviour" , "FAIL;Failed stop_recording.;#{ identity };stop_recording;"
|
92
92
|
Kernel::raise e
|
93
93
|
|
94
94
|
end
|
95
95
|
|
96
|
-
|
96
|
+
$logger.log "behaviour" , "PASS;Operation stop_recording executed successfully.;#{ identity };stop_recording;"
|
97
97
|
|
98
98
|
nil
|
99
99
|
|
@@ -113,19 +113,19 @@ module MobyBehaviour
|
|
113
113
|
|
114
114
|
rescue Exception => e
|
115
115
|
|
116
|
-
|
116
|
+
$logger.log "behaviour" , "FAIL;Failed print_recordings.;#{ identity };print_recordings;"
|
117
117
|
Kernel::raise e
|
118
118
|
|
119
119
|
end
|
120
120
|
|
121
|
-
|
121
|
+
$logger.log "behaviour" , "PASS;Operation print_recordings executed successfully.;#{ identity };print_recordings;"
|
122
122
|
|
123
123
|
return ret
|
124
124
|
|
125
125
|
end
|
126
126
|
|
127
127
|
# enable hooking for performance measurement & debug logging
|
128
|
-
|
128
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
129
129
|
|
130
130
|
end # Record
|
131
131
|
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb
CHANGED
@@ -112,16 +112,16 @@ module MobyBehaviour
|
|
112
112
|
|
113
113
|
rescue Exception => e
|
114
114
|
|
115
|
-
|
115
|
+
#$logger.log "behaviour" , "FAIL;Failed capture_screen with format \"#{format}\", file_name \"#{file_name}\".;#{ identity };capture_screen;"
|
116
116
|
|
117
|
-
|
117
|
+
$logger.log "behaviour" , "FAIL;Failed capture_screen with format \"%s\", file_name \"%s\".;%s;capture_screen;" % [ format, file_name, identity ]
|
118
118
|
|
119
119
|
Kernel::raise e
|
120
120
|
|
121
121
|
end
|
122
122
|
|
123
|
-
|
124
|
-
|
123
|
+
#$logger.log "behaviour" , "PASS;Operation capture_screen executed successfully with format \"#{format}\", file_name \"#{file_name}\".;#{ identity };capture_screen;"
|
124
|
+
$logger.log "behaviour" , "PASS;Operation capture_screen executed successfully with format \"%s\", file_name \"%s\".;%s;capture_screen;" % [ format, file_name, identity ]
|
125
125
|
|
126
126
|
image_binary
|
127
127
|
|
@@ -205,14 +205,14 @@ module MobyBehaviour
|
|
205
205
|
|
206
206
|
rescue Exception => e
|
207
207
|
|
208
|
-
|
208
|
+
$logger.log "behaviour",
|
209
209
|
"FAIL;Failed when searching for image on the screen.;#{ identity };find_on_screen;#{(image_or_path.respond_to?(:filename) ? image_or_path.filename : image_or_path.to_s)},#{tolerance.to_s}"
|
210
210
|
|
211
211
|
Kernel::raise e
|
212
212
|
|
213
213
|
end
|
214
214
|
|
215
|
-
|
215
|
+
$logger.log "behaviour",
|
216
216
|
"PASS;Image search completed successfully.;#{ identity };find_on_screen;#{(image_or_path.respond_to?(:filename) ? image_or_path.filename : image_or_path.to_s)},#{tolerance.to_s}"
|
217
217
|
|
218
218
|
result
|
@@ -258,7 +258,7 @@ module MobyBehaviour
|
|
258
258
|
result = !find_on_screen(image_or_path, tolerance).nil?
|
259
259
|
rescue Exception => exc
|
260
260
|
|
261
|
-
|
261
|
+
$logger.log "behaviour",
|
262
262
|
"FAIL;Failed when searching for image on the screen.;#{ identity };screen_contains?;#{(image_or_path.respond_to?(:filename) ? image_or_path.filename : image_or_path.to_s)},#{tolerance.to_s}"
|
263
263
|
|
264
264
|
Kernel::raise exc
|
@@ -266,7 +266,7 @@ module MobyBehaviour
|
|
266
266
|
|
267
267
|
end
|
268
268
|
|
269
|
-
|
269
|
+
$logger.log "behaviour",
|
270
270
|
"PASS;Image search completed successfully.;#{ identity };screen_contains?;#{(image_or_path.respond_to?(:filename) ? image_or_path.filename : image_or_path.to_s)},#{tolerance.to_s}"
|
271
271
|
|
272
272
|
result
|
@@ -274,7 +274,7 @@ module MobyBehaviour
|
|
274
274
|
end
|
275
275
|
|
276
276
|
# enable hooking for performance measurement & debug logging
|
277
|
-
|
277
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
278
278
|
|
279
279
|
|
280
280
|
end
|
@@ -83,11 +83,11 @@ module MobyBehaviour
|
|
83
83
|
begin
|
84
84
|
# execute the application control service request
|
85
85
|
apps = execute_command( MobyCommand::Application.new( :ListApps ) )
|
86
|
-
|
86
|
+
$logger.log "behaviour", "PASS;Successfully listed applications.;#{ id };sut;{};list_apps;"
|
87
87
|
|
88
88
|
rescue Exception => e
|
89
89
|
|
90
|
-
|
90
|
+
$logger.log "behaviour", "FAIL;Failed to list applications.;#{ id };sut;{};list_apps;"
|
91
91
|
Kernel::raise RuntimeError.new( "Unable to list applications: Exception: #{ e.message } (#{ e.class })" )
|
92
92
|
|
93
93
|
end
|
@@ -142,9 +142,9 @@ module MobyBehaviour
|
|
142
142
|
begin
|
143
143
|
# execute the application control service request
|
144
144
|
apps = execute_command( MobyCommand::Application.new( :ListCrashedApps ) )
|
145
|
-
|
145
|
+
$logger.log "behaviour", "PASS;Successfully listed crashed applications.;#{ id };sut;{};list_crashed_apps;"
|
146
146
|
rescue Exception => e
|
147
|
-
|
147
|
+
$logger.log "behaviour", "FAIL;Failed to list crashed applications.;#{ id };sut;{};list_crashed_apps;"
|
148
148
|
Kernel::raise RuntimeError.new( "Unable to list crashed applications: Exception: #{ e.message } (#{ e.class })" )
|
149
149
|
end
|
150
150
|
|
@@ -264,12 +264,13 @@ module MobyBehaviour
|
|
264
264
|
if param[:kill].nil?
|
265
265
|
xml = Nokogiri::XML(xml_source)
|
266
266
|
data = {}
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
267
|
+
object_xml_data, unused_rule = TDriver::TestObjectAdapter.get_objects( xml, { :type => 'Response'}, true )
|
268
|
+
object_xml_data.collect{ |element|
|
269
|
+
data.merge!(TDriver::TestObjectAdapter.test_object_attributes(element))
|
270
|
+
}
|
271
|
+
return data
|
272
|
+
else
|
273
|
+
# Killed processes have no relevant data.
|
273
274
|
data = {
|
274
275
|
:status => "KILLED",
|
275
276
|
:output => xml_source
|
@@ -277,6 +278,53 @@ module MobyBehaviour
|
|
277
278
|
end
|
278
279
|
end
|
279
280
|
|
281
|
+
|
282
|
+
# == description
|
283
|
+
# launches application in symbian device based on UID and return launched application if succesfull.
|
284
|
+
#
|
285
|
+
# == arguments
|
286
|
+
# hash_application
|
287
|
+
# Hash
|
288
|
+
# description: Hash defining required expected attributes of the application
|
289
|
+
# example: { :UID => '' }
|
290
|
+
#
|
291
|
+
# == returns
|
292
|
+
# MobyBase::Application
|
293
|
+
# description: launched application that matched the uid
|
294
|
+
# example: -
|
295
|
+
#
|
296
|
+
# == exceptions
|
297
|
+
# TypeError
|
298
|
+
# description: Wrong argument type %s for attributes (expected Hash)
|
299
|
+
#
|
300
|
+
def launch_with_uid( hash_uid = {} )
|
301
|
+
|
302
|
+
begin
|
303
|
+
|
304
|
+
raise TypeError.new( "Input parameter not of Type: Hash.\nIt is: #{ hash_uid.class }" ) unless hash_uid.kind_of?( Hash )
|
305
|
+
the_uid = "failed with uid:" + hash_uid[:UID].to_s
|
306
|
+
fullname = @sut.fixture("launch","launch_with_uid",hash_uid)
|
307
|
+
|
308
|
+
if(fullname == the_uid)
|
309
|
+
raise fullname
|
310
|
+
end
|
311
|
+
full_shortname = fullname.rpartition('\\')[-1]
|
312
|
+
shortname = full_shortname.rpartition('.')[0]
|
313
|
+
app_child = @sut.application(:name=>shortname)
|
314
|
+
|
315
|
+
rescue Exception => e
|
316
|
+
|
317
|
+
MobyUtil::Logger.instance.log "behaviour" , "FAIL;Failed to find application.;#{id.to_s};sut;{};application;" << (hash_uid.kind_of?(Hash) ? hash_uid.inspect : hash_uid.class.to_s)
|
318
|
+
Kernel::raise e
|
319
|
+
|
320
|
+
end
|
321
|
+
|
322
|
+
MobyUtil::Logger.instance.log "behaviour" , "PASS;Application found.;#{id.to_s};sut;{};application;" << hash_uid.inspect
|
323
|
+
|
324
|
+
app_child
|
325
|
+
|
326
|
+
end
|
327
|
+
|
280
328
|
# == description
|
281
329
|
# Returns details about the tested target. The data is platform/device specific which will make your scripts platform dependant. For devices with mobility apis the data available from them is returned and could be somewhat similar across platforms. Memory details are returned in a fixed format so they can be used and still maintain compatibility cross platforms. However it should be noted that platforms which do not support memory details will return -1 (scripts will not break but data will not be usable).
|
282
330
|
# == arguments
|
@@ -375,7 +423,7 @@ module MobyBehaviour
|
|
375
423
|
nil
|
376
424
|
rescue Exception => e
|
377
425
|
|
378
|
-
|
426
|
+
$logger.log "behaviour" , "FAIL;Failed tap_screen on coords \"#{x}:#{y}\";"
|
379
427
|
Kernel::raise e
|
380
428
|
|
381
429
|
end
|
@@ -396,9 +444,9 @@ module MobyBehaviour
|
|
396
444
|
begin
|
397
445
|
# execute the application control service request
|
398
446
|
execute_command( MobyCommand::Application.new( :CloseQttas ) )
|
399
|
-
|
447
|
+
$logger.log "behaviour", "PASS;Successfully closed qttas.;#{ id };sut;{};close_qttas;"
|
400
448
|
rescue Exception => e
|
401
|
-
|
449
|
+
$logger.log "behaviour", "FAIL;Failed to close qttas.;#{ id };sut;{};close_qttas;"
|
402
450
|
Kernel::raise RuntimeError.new( "Unable to close qttas: Exception: #{ e.message } (#{ e.class })" )
|
403
451
|
end
|
404
452
|
nil
|
@@ -449,9 +497,9 @@ module MobyBehaviour
|
|
449
497
|
thread_name,
|
450
498
|
nil, nil, nil, nil, nil, nil,
|
451
499
|
{:file_name => file_name, :timestamp => timestamp_type, :interval_s => interval_s} ) )
|
452
|
-
|
500
|
+
$logger.log "behaviour", "PASS;Successfully started process memory logging.;#{ id };sut;{};log_process_mem_start;"
|
453
501
|
rescue Exception => e
|
454
|
-
|
502
|
+
$logger.log "behaviour", "FAIL;Failed to start process memory logging.;#{ id };sut;{};log_process_mem_start;"
|
455
503
|
Kernel::raise RuntimeError.new( "Unable to start process memory logging: Exception: #{ e.message } (#{ e.class })" )
|
456
504
|
end
|
457
505
|
status
|
@@ -489,9 +537,9 @@ module MobyBehaviour
|
|
489
537
|
thread_name,
|
490
538
|
nil, nil, nil, nil, nil, nil,
|
491
539
|
{:return_data => return_data} ) )
|
492
|
-
|
540
|
+
$logger.log "behaviour", "PASS;Successfully stopped process memory logging.;#{ id };sut;{};log_process_mem_stop;"
|
493
541
|
rescue Exception => e
|
494
|
-
|
542
|
+
$logger.log "behaviour", "FAIL;Failed to stop process memory logging.;#{ id };sut;{};log_process_mem_stop;"
|
495
543
|
Kernel::raise RuntimeError.new( "Unable to stop process memory logging: Exception: #{ e.message } (#{ e.class })" )
|
496
544
|
end
|
497
545
|
log
|
@@ -521,9 +569,9 @@ module MobyBehaviour
|
|
521
569
|
:CpuLoadStart,
|
522
570
|
nil, nil, nil, nil, nil, nil, nil,
|
523
571
|
{:cpu_load => load} ) )
|
524
|
-
|
572
|
+
$logger.log "behaviour", "PASS;Successfully started generating CPU load.;#{ id };sut;{};cpu_load_start;"
|
525
573
|
rescue Exception => e
|
526
|
-
|
574
|
+
$logger.log "behaviour", "FAIL;Failed to start generating CPU load.;#{ id };sut;{};cpu_load_start;"
|
527
575
|
Kernel::raise RuntimeError.new( "Unable to start generating CPU load: Exception: #{ e.message } (#{ e.class })" )
|
528
576
|
end
|
529
577
|
end
|
@@ -541,9 +589,9 @@ module MobyBehaviour
|
|
541
589
|
def cpu_load_stop
|
542
590
|
begin
|
543
591
|
status = execute_command(MobyCommand::Application.new(:CpuLoadStop) )
|
544
|
-
|
592
|
+
$logger.log "behaviour", "PASS;Successfully started generating CPU load.;#{ id };sut;{};cpu_load_start;"
|
545
593
|
rescue Exception => e
|
546
|
-
|
594
|
+
$logger.log "behaviour", "FAIL;Failed to start generating CPU load.;#{ id };sut;{};cpu_load_start;"
|
547
595
|
Kernel::raise RuntimeError.new( "Unable to start generating CPU load: Exception: #{ e.message } (#{ e.class })" )
|
548
596
|
end
|
549
597
|
end
|
@@ -575,15 +623,19 @@ module MobyBehaviour
|
|
575
623
|
interval_millis = interval*1000 # to millis
|
576
624
|
|
577
625
|
# make one refresh before execution then freeze
|
626
|
+
find_object_state = self.parameter[ :use_find_object, false ]
|
627
|
+
self.parameter[ :use_find_object] = false
|
628
|
+
|
578
629
|
app.force_refresh({:id => get_application_id})
|
579
630
|
self.freeze
|
580
631
|
|
581
632
|
#disable sleep to avoid unnecessary sleeping
|
582
|
-
|
633
|
+
self.parameter[ :sleep_disabled ] = true
|
583
634
|
|
584
635
|
ret = execute_command( MobyCommand::Group.new(interval_millis.to_i, app, block ) )
|
585
636
|
|
586
|
-
|
637
|
+
self.parameter[ :sleep_disabled ] = false
|
638
|
+
self.parameter[ :use_find_object] = find_object_state
|
587
639
|
|
588
640
|
self.unfreeze
|
589
641
|
|
@@ -592,9 +644,9 @@ module MobyBehaviour
|
|
592
644
|
# commands have been executed
|
593
645
|
sleep (ret*interval)
|
594
646
|
|
595
|
-
|
647
|
+
$logger.log "behaviour", "PASS;Successfully executed grouped behaviours.;#{ id };sut;{};group_behaviours;"
|
596
648
|
rescue Exception => e
|
597
|
-
|
649
|
+
$logger.log "behaviour", "FAIL;Failed to execute grouped behaviours.;#{ id };sut;{};group_behaviours;"
|
598
650
|
Kernel::raise RuntimeError.new( "Unable to execute grouped behaviours: Exception: #{ e.message } (#{ e.class })" )
|
599
651
|
end
|
600
652
|
nil
|
@@ -622,7 +674,7 @@ module MobyBehaviour
|
|
622
674
|
#
|
623
675
|
def set_event_type(new_type)
|
624
676
|
raise ArgumentError.new("Invalid event type. Accepted values :" << @@_event_type_map.keys.join(", :") ) unless @@_event_type_map.include?(new_type)
|
625
|
-
|
677
|
+
$parameters[ self.id ][ :event_type] = @@_event_type_map[new_type]
|
626
678
|
nil
|
627
679
|
end
|
628
680
|
|
@@ -633,7 +685,7 @@ module MobyBehaviour
|
|
633
685
|
end
|
634
686
|
|
635
687
|
# enable hooking for performance measurement & debug logging
|
636
|
-
|
688
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
637
689
|
|
638
690
|
end
|
639
691
|
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb
CHANGED
@@ -108,8 +108,8 @@ module MobyBehaviour
|
|
108
108
|
begin
|
109
109
|
|
110
110
|
signals_xml = MobyUtil::XML.parse_string( self.fixture( 'signal', 'get_signal' ) )
|
111
|
-
|
112
|
-
|
111
|
+
_signal_found_xml, unused_rule = TDriver::TestObjectAdapter.get_objects( signals_xml, { :type => 'QtSignal', :name => signal_name}, true )
|
112
|
+
signal_found = true unless _signal_found_xml.empty?
|
113
113
|
|
114
114
|
end # begin
|
115
115
|
|
@@ -125,7 +125,7 @@ module MobyBehaviour
|
|
125
125
|
end # wait_for_signal
|
126
126
|
|
127
127
|
# enable hooking for performance measurement & debug logging
|
128
|
-
|
128
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
129
129
|
|
130
130
|
end # Synchronization
|
131
131
|
|
@@ -85,28 +85,28 @@ module MobyBehaviour
|
|
85
85
|
command.application_id(get_application_id)
|
86
86
|
command.object_type(:Standard)
|
87
87
|
command.command_name('CheckState')
|
88
|
-
command.set_event_type(
|
88
|
+
command.set_event_type($parameters[ @sut.id ][ :event_type, "0" ])
|
89
89
|
params = {:state => new_state, :column => self.attribute('column'), :item => self.attribute('parentItem')}
|
90
90
|
|
91
|
-
command.set_event_type(
|
91
|
+
command.set_event_type($parameters[ @sut.id ][ :event_type, "0" ])
|
92
92
|
|
93
93
|
command.command_params(params)
|
94
94
|
@sut.execute_command(command)
|
95
95
|
|
96
96
|
rescue Exception => e
|
97
97
|
|
98
|
-
|
98
|
+
$logger.log "behaviour" , "FAIL;Failed select"#{identity};drag;"
|
99
99
|
Kernel::raise e
|
100
100
|
|
101
101
|
end
|
102
102
|
|
103
|
-
|
103
|
+
$logger.log "behaviour" , "PASS;Operation select executed successfully"#{identity};drag;"
|
104
104
|
ret
|
105
105
|
|
106
106
|
end
|
107
107
|
|
108
108
|
# enable hooking for performance measurement & debug logging
|
109
|
-
|
109
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
110
110
|
end
|
111
111
|
|
112
112
|
end
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb
CHANGED
@@ -77,19 +77,19 @@ module MobyBehaviour
|
|
77
77
|
|
78
78
|
rescue Exception => e
|
79
79
|
|
80
|
-
|
80
|
+
$logger.log "behaviour" , "FAIL;Failed type_text with text \"#{text}\".;#{identity};type_text;"
|
81
81
|
Kernel::raise e
|
82
82
|
|
83
83
|
end
|
84
84
|
|
85
|
-
|
85
|
+
$logger.log "behaviour" , "PASS;Operation type_text executed successfully with text \"#{text}\".;#{identity};type_text;"
|
86
86
|
|
87
87
|
ret
|
88
88
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# enable hooking for performance measurement & debug logging
|
92
|
-
|
92
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
93
93
|
|
94
94
|
|
95
95
|
end
|