testability-driver-qt-sut-plugin 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/action.rb +7 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +190 -182
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +2 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb +17 -17
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +6 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +6 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +2 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fixture.rb +10 -14
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fps.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +387 -338
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +177 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/locale_db.rb +2 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +34 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +4 -4
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/os.rb +4 -4
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +6 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +8 -12
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/settings.rb +8 -8
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/sut.rb +171 -115
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +2 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +11 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +2 -2
- 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 -13
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +54 -63
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/find_object.rb +45 -28
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/version.rb +34 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/widget.rb +2 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb +174 -121
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/find_object.rb +35 -26
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/version.rb +56 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +64 -16
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb +138 -40
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/communication.rb +91 -83
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/find_object_generator.rb +222 -44
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb +176 -10
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +2 -2
- data/xml/behaviour/qt.xml +12 -0
- metadata +7 -5
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb
CHANGED
@@ -20,6 +20,160 @@
|
|
20
20
|
module MobyUtil
|
21
21
|
|
22
22
|
module MessageComposer
|
23
|
+
|
24
|
+
class TasCommands
|
25
|
+
|
26
|
+
# TODO: document me
|
27
|
+
def initialize( options = {} )
|
28
|
+
|
29
|
+
@command_attributes = options
|
30
|
+
|
31
|
+
@targets = []
|
32
|
+
|
33
|
+
end # initialize
|
34
|
+
|
35
|
+
# TODO: document me
|
36
|
+
def target( options = {} )
|
37
|
+
|
38
|
+
@targets << { :arguments => options, :objects => [], :commands => [] }
|
39
|
+
|
40
|
+
end # target
|
41
|
+
|
42
|
+
# TODO: document me
|
43
|
+
def targets
|
44
|
+
|
45
|
+
@targets
|
46
|
+
|
47
|
+
end # targets
|
48
|
+
|
49
|
+
def object( *arguments )
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
# TODO: document me
|
54
|
+
def command( *arguments )
|
55
|
+
|
56
|
+
command_hash = { :parameters => [] }
|
57
|
+
|
58
|
+
while arguments.count > 0
|
59
|
+
|
60
|
+
value = arguments.shift
|
61
|
+
|
62
|
+
if value.kind_of?( Hash )
|
63
|
+
|
64
|
+
command_hash[ :arguments ] = value
|
65
|
+
|
66
|
+
else
|
67
|
+
|
68
|
+
command_hash[ :value ] = value
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
@targets.last[ :commands ] << command_hash
|
75
|
+
|
76
|
+
end # command
|
77
|
+
|
78
|
+
# TODO: document me
|
79
|
+
def parameter( *arguments )
|
80
|
+
|
81
|
+
params_hash = {}
|
82
|
+
|
83
|
+
while arguments.count > 0
|
84
|
+
|
85
|
+
value = arguments.shift
|
86
|
+
|
87
|
+
if value.kind_of?( Hash )
|
88
|
+
|
89
|
+
params_hash[ :arguments ] = value
|
90
|
+
|
91
|
+
else
|
92
|
+
|
93
|
+
params_hash[ :value ] = value
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
@targets.last[ :commands ][ :parameters ] << params_hash
|
100
|
+
|
101
|
+
end # parameter
|
102
|
+
|
103
|
+
# TODO: document me
|
104
|
+
def to_xml
|
105
|
+
|
106
|
+
targets = targets_to_xml
|
107
|
+
|
108
|
+
if targets.length > 0
|
109
|
+
|
110
|
+
"<TasCommands #{ @command_attributes.to_attributes }>#{ targets }</TasCommands>"
|
111
|
+
|
112
|
+
else
|
113
|
+
|
114
|
+
"<TasCommands #{ @command_attributes.to_attributes } />"
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
end # to_xml
|
120
|
+
|
121
|
+
private
|
122
|
+
|
123
|
+
# TODO: document me
|
124
|
+
def targets_to_xml
|
125
|
+
|
126
|
+
@targets.collect do | target |
|
127
|
+
|
128
|
+
commands = target[ :commands ].collect do | command |
|
129
|
+
|
130
|
+
value = command[ :value ]
|
131
|
+
|
132
|
+
params = command[ :parameters ].collect do | parameter |
|
133
|
+
|
134
|
+
if parameter.has_key?( :value )
|
135
|
+
|
136
|
+
"<param #{ parameters[ :arguments ].to_attributes }>#{ parameters[ :value ] }</param>"
|
137
|
+
|
138
|
+
else
|
139
|
+
|
140
|
+
"<param #{ parameters[ :arguments ].to_attributes } />"
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
end.join
|
145
|
+
|
146
|
+
value = params if params.count > 0
|
147
|
+
|
148
|
+
unless value.nil?
|
149
|
+
|
150
|
+
"<Command #{ command[ :arguments ].to_attributes }>#{ command[ :value ] }</Command>"
|
151
|
+
|
152
|
+
else
|
153
|
+
|
154
|
+
"<Command #{ command[ :arguments ].to_attributes } />"
|
155
|
+
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
|
160
|
+
if commands.count > 0
|
161
|
+
|
162
|
+
commands.unshift("<Target #{ target[ :arguments ].to_attributes }></Target>")
|
163
|
+
|
164
|
+
else
|
165
|
+
|
166
|
+
commands.unshift("<Target #{ target[ :arguments ].to_attributes } />")
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
commands.join
|
171
|
+
|
172
|
+
end.join
|
173
|
+
|
174
|
+
end # targets_to_xml
|
175
|
+
|
176
|
+
end # TasCommands
|
23
177
|
|
24
178
|
def make_parametrized_message( service_details, command_name, params, command_params = {} )
|
25
179
|
service_details[:plugin_timeout] = $parameters[ @_sut.id ][ :qttas_plugin_timeout, 10000 ] if @_sut
|
@@ -121,9 +275,6 @@ module MobyUtil
|
|
121
275
|
|
122
276
|
when 'dynamic'
|
123
277
|
|
124
|
-
# updates the filter with the current backtrace file list
|
125
|
-
#MobyUtil::DynamicAttributeFilter.instance.update_filter( caller( 0 ) )
|
126
|
-
|
127
278
|
white_list = MobyUtil::DynamicAttributeFilter.instance.filter_string
|
128
279
|
params['attributeWhiteList'] = white_list if white_list
|
129
280
|
|
@@ -139,20 +290,35 @@ module MobyUtil
|
|
139
290
|
end
|
140
291
|
|
141
292
|
def state_message
|
293
|
+
|
142
294
|
app_details = { :service => 'uiState', :name => @_application_name, :id => @_application_uid }
|
295
|
+
|
143
296
|
app_details[ :applicationUid ] = @_refresh_args[ :applicationUid ] if @_refresh_args.include?( :applicationUid )
|
297
|
+
|
298
|
+
app_details[ :checksum ] = @_checksum unless @_checksum.nil?
|
299
|
+
|
300
|
+
params = @_flags || {}
|
144
301
|
|
145
302
|
case $parameters[ @_sut.id ][ :filter_type, 'none' ]
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
303
|
+
|
304
|
+
when 'none'
|
305
|
+
|
306
|
+
command_xml = make_xml_message( app_details, 'UiState', params )
|
307
|
+
|
308
|
+
when 'dynamic'
|
309
|
+
|
310
|
+
params[ :filtered ] = 'true'
|
311
|
+
|
312
|
+
command_xml = make_parametrized_message( app_details, 'UiState', params, make_filters )
|
313
|
+
|
152
314
|
else
|
153
|
-
|
315
|
+
|
316
|
+
command_xml = make_parametrized_message( app_details, 'UiState', params, make_filters )
|
317
|
+
|
154
318
|
end
|
319
|
+
|
155
320
|
command_xml
|
321
|
+
|
156
322
|
end
|
157
323
|
|
158
324
|
def run_message
|
@@ -62,12 +62,12 @@ module MobyUtil
|
|
62
62
|
|
63
63
|
rescue Exception => e
|
64
64
|
|
65
|
-
$logger.
|
65
|
+
$logger.behaviour "FAIL;Failed #{behavior_name} with x \"#{x}\", y \"#{y}\", button \"#{button.to_s}\".;#{identity};#{behavior_name};"
|
66
66
|
Kernel::raise e
|
67
67
|
|
68
68
|
end
|
69
69
|
|
70
|
-
$logger.
|
70
|
+
$logger.behaviour "PASS;Operation #{behavior_name} executed successfully with x \"#{x}\", y \"#{y}\", button \"#{button.to_s}\".;#{identity};#{behavior_name};"
|
71
71
|
|
72
72
|
nil
|
73
73
|
|
data/xml/behaviour/qt.xml
CHANGED
@@ -715,6 +715,14 @@
|
|
715
715
|
<description>Stop cpu logging and get the results.</description>
|
716
716
|
<example>stop_cpu_log</example>
|
717
717
|
</method>
|
718
|
+
<method name="log_pwr">
|
719
|
+
<description>Log the power usage of the process</description>
|
720
|
+
<example>log_pwr</example>
|
721
|
+
</method>
|
722
|
+
<method name="stop_pwr_log">
|
723
|
+
<description>Stop power logging and get the results.</description>
|
724
|
+
<example>stop_pwr_log</example>
|
725
|
+
</method>
|
718
726
|
<method name="log_mem">
|
719
727
|
<description>Log memory usage.</description>
|
720
728
|
<example>log_mem</example>
|
@@ -735,6 +743,10 @@
|
|
735
743
|
<description>Load cpu logging results.</description>
|
736
744
|
<example>load_cpu_log</example>
|
737
745
|
</method>
|
746
|
+
<method name="load_pwr_log">
|
747
|
+
<description>Load power logging results.</description>
|
748
|
+
<example>load_pwr_log</example>
|
749
|
+
</method>
|
738
750
|
<method name="load_gpu_log">
|
739
751
|
<description>Load Gpu logging results.</description>
|
740
752
|
<example>load_gpu_log</example>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testability-driver-qt-sut-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 1.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- TDriver team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-08 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: testability-driver
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/infologger_command.rb
|
80
80
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb
|
81
81
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/tap.rb
|
82
|
+
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/version.rb
|
82
83
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/widget.rb
|
83
84
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb
|
84
85
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/configure_command.rb
|
@@ -89,6 +90,7 @@ files:
|
|
89
90
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/key_sequence.rb
|
90
91
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/screen_capture.rb
|
91
92
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/tap.rb
|
93
|
+
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/version.rb
|
92
94
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb
|
93
95
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb
|
94
96
|
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb
|