testability-driver-qt-sut-plugin 1.3.1 → 1.3.2
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 +4 -4
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +5 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +130 -91
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +5 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/file_transfer.rb +40 -26
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fps.rb +88 -71
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +10 -10
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +2 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +2 -2
- 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/qt_api_method.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +11 -11
- 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 +12 -12
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/webkit.rb +126 -126
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +49 -29
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/group.rb +17 -21
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb +4 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/widget.rb +59 -86
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb +19 -17
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/group.rb +13 -10
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb +38 -25
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +6 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/fixture_parameter.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +1 -4
- data/xml/template/qt.xml +1 -0
- metadata +28 -9
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb
CHANGED
@@ -23,23 +23,13 @@ module MobyController
|
|
23
23
|
|
24
24
|
module Application
|
25
25
|
|
26
|
-
include
|
27
|
-
|
28
|
-
def set_adapter( adapter )
|
29
|
-
|
30
|
-
@sut_adapter = adapter
|
31
|
-
|
32
|
-
end
|
26
|
+
include MobyController::Abstraction
|
33
27
|
|
28
|
+
include MobyUtil::MessageComposer
|
34
29
|
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
# == returns
|
39
|
-
# == raises
|
40
|
-
# ArgumentError: raised if unsupported command type
|
41
|
-
def execute
|
42
|
-
|
30
|
+
# create message to be sent sut SUT adapter - returns [ "message_body", boolean ]
|
31
|
+
def make_message
|
32
|
+
|
43
33
|
return_response_crc = false
|
44
34
|
|
45
35
|
case @_command
|
@@ -176,14 +166,26 @@ module MobyController
|
|
176
166
|
raise ArgumentError, "Unknown command! #{ @_command.to_s }"
|
177
167
|
|
178
168
|
end
|
169
|
+
|
170
|
+
[ Comms::MessageGenerator.generate( command_xml ), return_response_crc ]
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
# Execute the command
|
175
|
+
# Sends the message to the device using the @sut_adapter (see base class)
|
176
|
+
# == params
|
177
|
+
# == returns
|
178
|
+
# == raises
|
179
|
+
# ArgumentError: raised if unsupported command type
|
180
|
+
def execute
|
179
181
|
|
180
|
-
message =
|
182
|
+
message, return_response_crc = make_message
|
181
183
|
|
182
184
|
@sut_adapter.send_service_request( message, return_response_crc ) if message
|
183
185
|
|
184
186
|
end
|
185
187
|
|
186
|
-
end #
|
188
|
+
end # Application
|
187
189
|
|
188
190
|
end # QT
|
189
191
|
|
@@ -23,6 +23,8 @@ module MobyController
|
|
23
23
|
|
24
24
|
module Group
|
25
25
|
|
26
|
+
include MobyController::Abstraction
|
27
|
+
|
26
28
|
# Execute the command).
|
27
29
|
# Sends the message to the device using the @sut_adapter (see base class)
|
28
30
|
# == params
|
@@ -30,25 +32,26 @@ module MobyController
|
|
30
32
|
# == raises
|
31
33
|
# NotImplementedError: raised if unsupported command type
|
32
34
|
def execute
|
35
|
+
|
33
36
|
builder = Nokogiri::XML::Builder.new{
|
34
|
-
|
37
|
+
|
38
|
+
TasCommands( :id=> application.id.to_s, :transitions => 'true', :service => 'uiCommand', :interval => interval.to_s, :multitouch => multitouch.to_s )
|
39
|
+
|
35
40
|
}
|
36
41
|
|
37
|
-
@sut_adapter.set_message_builder(builder)
|
38
|
-
block.call
|
39
|
-
@sut_adapter.send_grouped_request
|
42
|
+
@sut_adapter.set_message_builder( builder )
|
40
43
|
|
41
|
-
|
44
|
+
@block.call
|
45
|
+
|
46
|
+
@sut_adapter.send_grouped_request
|
42
47
|
|
43
|
-
def set_adapter( adapter )
|
44
|
-
@sut_adapter = adapter
|
45
48
|
end
|
46
49
|
|
47
50
|
# enable hooking for performance measurement & debug logging
|
48
51
|
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
49
52
|
|
50
|
-
end #
|
53
|
+
end # Group
|
51
54
|
|
52
|
-
end #
|
55
|
+
end # QT
|
53
56
|
|
54
|
-
end #
|
57
|
+
end # MobyController
|
@@ -23,37 +23,40 @@ module MobyController
|
|
23
23
|
|
24
24
|
module WidgetCommand
|
25
25
|
|
26
|
-
|
27
|
-
# Sends the message to the device using the @sut_adapter (see base class)
|
28
|
-
# == params
|
29
|
-
# == returns
|
30
|
-
# == raises
|
31
|
-
# NotImplementedError: raised if unsupported command type
|
32
|
-
def execute
|
26
|
+
include MobyController::Abstraction
|
33
27
|
|
34
|
-
|
28
|
+
# generate service request
|
29
|
+
def make_message
|
35
30
|
|
36
|
-
|
31
|
+
# reduce AST calls
|
32
|
+
_application_id = @_application_id
|
33
|
+
_transitions = @_transitions
|
34
|
+
_service = @_service
|
35
|
+
|
36
|
+
_object_id = @_object_id
|
37
|
+
_object_type = @_object_type
|
38
|
+
_command_value = @_command_value
|
39
|
+
|
40
|
+
# Object#not_nil return self if value not nil
|
41
|
+
_command_params = { :eventType => @_event_type.not_nil('Assert: event_type must be set!'), :name => @_command_name }.merge!( @_command_params || {} )
|
37
42
|
|
38
43
|
builder = Nokogiri::XML::Builder.new{
|
39
44
|
|
40
|
-
TasCommands( :id =>
|
45
|
+
TasCommands( :id => _application_id, :transitions => _transitions, :service => _service || 'uiCommand' ) {
|
41
46
|
|
42
|
-
Target( :TasId =>
|
47
|
+
Target( :TasId => _object_id, :type => _object_type ) {
|
43
48
|
|
44
|
-
if
|
49
|
+
if _command_value.kind_of?( Array )
|
45
50
|
|
46
|
-
|
47
|
-
Command( command_part[ :value ], command_part[ :params ] )
|
48
|
-
end
|
51
|
+
_command_value.each do | command_part | Command( command_part[ :value ], command_part[ :params ] ); end
|
49
52
|
|
50
|
-
elsif
|
53
|
+
elsif _command_value
|
51
54
|
|
52
|
-
Command(
|
55
|
+
Command( _command_value, _command_params )
|
53
56
|
|
54
57
|
else
|
55
58
|
|
56
|
-
Command(
|
59
|
+
Command( _command_params )
|
57
60
|
|
58
61
|
end
|
59
62
|
|
@@ -61,17 +64,27 @@ module MobyController
|
|
61
64
|
}
|
62
65
|
}
|
63
66
|
|
67
|
+
end
|
68
|
+
|
69
|
+
# Execute the command).
|
70
|
+
# Sends the message to the device using the @sut_adapter (see base class)
|
71
|
+
# == params
|
72
|
+
# == returns
|
73
|
+
# == raises
|
74
|
+
# NotImplementedError: raised if unsupported command type
|
75
|
+
def execute
|
76
|
+
|
77
|
+
message = make_message
|
78
|
+
|
64
79
|
if @sut_adapter.group?
|
65
|
-
@sut_adapter.append_command( builder.doc.root.children )
|
66
|
-
else
|
67
|
-
@sut_adapter.send_service_request( Comms::MessageGenerator.generate( builder.to_xml ) )
|
68
|
-
end
|
69
80
|
|
70
|
-
|
81
|
+
@sut_adapter.append_command( message.doc.root.children )
|
71
82
|
|
72
|
-
|
83
|
+
else
|
84
|
+
|
85
|
+
@sut_adapter.send_service_request( Comms::MessageGenerator.generate( message.to_xml ) )
|
73
86
|
|
74
|
-
|
87
|
+
end
|
75
88
|
|
76
89
|
end
|
77
90
|
|
@@ -152,18 +152,17 @@ module MobyPlugin
|
|
152
152
|
# send service request for agent version number
|
153
153
|
agent_version = sut_controller.__send__( :execute_command, MobyCommand::VersionCommand.new )
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
adapter = TDriver::OptimizedXML::TestObjectAdapter
|
155
|
+
# agent version 1.3 or later supports new smaller xml format
|
156
|
+
if agent_version >= "1.3"
|
157
|
+
|
158
|
+
# use optimized XML format; if adapter is not found we're going through rescue block
|
159
|
+
adapter = TDriver::OptimizedXML::TestObjectAdapter
|
161
160
|
|
162
161
|
else
|
163
162
|
|
164
163
|
# didn't recognize the version number use old TDriver::TestObjectAdapter
|
165
164
|
raise
|
166
|
-
|
165
|
+
|
167
166
|
end
|
168
167
|
|
169
168
|
rescue
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/fixture_parameter.rb
CHANGED
@@ -34,7 +34,7 @@ module MobyUtil
|
|
34
34
|
|
35
35
|
def add_parameter( hash )
|
36
36
|
|
37
|
-
|
37
|
+
raise ArgumentError.new("Argument :value and :type must be defined. Actual hash: #{ hash.inspect }") unless hash.has_key?( :type ) and hash.has_key?( :value )
|
38
38
|
|
39
39
|
@parameters.push( hash )
|
40
40
|
|
@@ -37,9 +37,6 @@ module MobyUtil
|
|
37
37
|
use_tap_screen = $parameters[ @sut.id ][ :use_tap_screen, 'false' ]
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
40
|
raise ArgumentError.new( "Coordinate x:#{x} x_abs:#{x} outside object." ) unless (x <= attribute('width').to_i and x >= 0)
|
44
41
|
raise ArgumentError.new( "Coordinate y:#{y} y_abs:#{y} outside object." ) unless (y <= attribute('height').to_i and y >= 0)
|
45
42
|
|
@@ -63,7 +60,7 @@ module MobyUtil
|
|
63
60
|
rescue Exception => e
|
64
61
|
|
65
62
|
$logger.behaviour "FAIL;Failed #{behavior_name} with x \"#{x}\", y \"#{y}\", button \"#{button.to_s}\".;#{identity};#{behavior_name};"
|
66
|
-
|
63
|
+
raise e
|
67
64
|
|
68
65
|
end
|
69
66
|
|
data/xml/template/qt.xml
CHANGED
@@ -84,6 +84,7 @@
|
|
84
84
|
<parameter name="qttas_plugin_timeout" value="10000" />
|
85
85
|
<!-- QT Server port -->
|
86
86
|
<parameter name="qt_tcp_server_port" value="1514" /> <!-- JKo: what is this?? is it actually used anywhere? -->
|
87
|
+
<parameter name="qt_file_transfer_block_size" value="4096" />
|
87
88
|
</template>
|
88
89
|
|
89
90
|
<template name="qt_fixtures">
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testability-driver-qt-sut-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 2
|
10
|
+
version: 1.3.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- TDriver team
|
@@ -9,19 +15,25 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2011-
|
18
|
+
date: 2011-10-26 00:00:00 +03:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: testability-driver
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 57
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 3
|
23
34
|
version: 0.8.3
|
24
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
25
37
|
description:
|
26
38
|
email: testabilitydriver@nokia.com
|
27
39
|
executables: []
|
@@ -97,6 +109,7 @@ files:
|
|
97
109
|
- xml/keymap/win.xml
|
98
110
|
- xml/keymap/qt.xml
|
99
111
|
- xml/template/qt.xml
|
112
|
+
- installer/extconf.rb
|
100
113
|
has_rdoc: true
|
101
114
|
homepage: http://gitorious.org/tdriver
|
102
115
|
licenses: []
|
@@ -107,21 +120,27 @@ rdoc_options: []
|
|
107
120
|
require_paths:
|
108
121
|
- lib/testability-driver-plugins/
|
109
122
|
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
110
124
|
requirements:
|
111
125
|
- - ">="
|
112
126
|
- !ruby/object:Gem::Version
|
127
|
+
hash: 3
|
128
|
+
segments:
|
129
|
+
- 0
|
113
130
|
version: "0"
|
114
|
-
version:
|
115
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
116
133
|
requirements:
|
117
134
|
- - ">="
|
118
135
|
- !ruby/object:Gem::Version
|
136
|
+
hash: 3
|
137
|
+
segments:
|
138
|
+
- 0
|
119
139
|
version: "0"
|
120
|
-
version:
|
121
140
|
requirements: []
|
122
141
|
|
123
142
|
rubyforge_project:
|
124
|
-
rubygems_version: 1.3.
|
143
|
+
rubygems_version: 1.3.7
|
125
144
|
signing_key:
|
126
145
|
specification_version: 3
|
127
146
|
summary: Testability Driver - Testability Driver Interface Qt SUT plugin
|