honeydew 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/honeydew/device.rb
CHANGED
@@ -56,21 +56,34 @@ module Honeydew
|
|
56
56
|
request = Net::HTTP::Post.new uri.path
|
57
57
|
request.set_form_data action: action, arguments: arguments.to_json.to_s
|
58
58
|
|
59
|
-
response =
|
60
|
-
|
61
|
-
|
59
|
+
response = benchmark do
|
60
|
+
Net::HTTP.start(uri.hostname, uri.port) do |http|
|
61
|
+
http.read_timeout = Honeydew.config.server_timeout
|
62
|
+
http.request request
|
63
|
+
end
|
62
64
|
end
|
63
65
|
|
64
66
|
case response
|
65
67
|
when Net::HTTPOK
|
66
|
-
|
68
|
+
info "action succeeded, response: #{response.body}"
|
69
|
+
response.body
|
67
70
|
when Net::HTTPNoContent
|
71
|
+
info "action failed, response: #{response.body}"
|
68
72
|
raise ActionFailedError.new response.body
|
69
73
|
else
|
70
74
|
raise "honeydew-server failed to process command, response: #{response.body}"
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
78
|
+
def benchmark
|
79
|
+
result = nil
|
80
|
+
realtime = Benchmark.realtime do
|
81
|
+
result = yield
|
82
|
+
end
|
83
|
+
debug "action completed in #{(realtime * 1000).to_i}ms"
|
84
|
+
result
|
85
|
+
end
|
86
|
+
|
74
87
|
def ensure_device_ready
|
75
88
|
@device_ready ||= begin
|
76
89
|
wait_for_honeydew_server
|
@@ -18,12 +18,14 @@ module Honeydew
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def dump_window_hierarchy(local_path)
|
21
|
-
path_in_device = perform_action('dump_window_hierarchy')
|
21
|
+
path_in_device = perform_action('dump_window_hierarchy')
|
22
|
+
info "dumping window hierarchy to #{local_path}..."
|
22
23
|
adb "pull #{path_in_device} #{local_path}"
|
23
24
|
end
|
24
25
|
|
25
26
|
def take_screenshot(local_path)
|
26
27
|
path_in_device = '/data/local/tmp/honeydew.png'
|
28
|
+
info "saving screenshot to #{local_path}..."
|
27
29
|
adb "shell /system/bin/screencap -p #{path_in_device}"
|
28
30
|
adb "pull #{path_in_device} #{local_path}"
|
29
31
|
end
|
data/lib/honeydew/honeydew.rb
CHANGED
data/lib/honeydew/version.rb
CHANGED
data/server/pom.xml
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,128 +1,121 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeydew
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
version: 0.19.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Selvakumar Natesan
|
9
9
|
- Christopher Rex
|
10
10
|
- Shyam Vala
|
11
11
|
- John Barker
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-08-
|
15
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
19
|
-
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
20
21
|
requirements:
|
21
|
-
- -
|
22
|
+
- - ! '>='
|
22
23
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
24
|
-
|
24
|
+
version: '0'
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
28
|
none: false
|
26
|
-
requirement: !ruby/object:Gem::Requirement
|
27
29
|
requirements:
|
28
|
-
- -
|
30
|
+
- - ! '>='
|
29
31
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
31
|
-
MA==
|
32
|
-
none: false
|
33
|
-
prerelease: false
|
34
|
-
type: :runtime
|
32
|
+
version: '0'
|
35
33
|
- !ruby/object:Gem::Dependency
|
36
34
|
name: json
|
37
|
-
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
38
37
|
requirements:
|
39
|
-
- -
|
38
|
+
- - ! '>='
|
40
39
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
42
|
-
|
40
|
+
version: '0'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
44
|
none: false
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ! '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
49
|
-
MA==
|
50
|
-
none: false
|
51
|
-
prerelease: false
|
52
|
-
type: :runtime
|
48
|
+
version: '0'
|
53
49
|
- !ruby/object:Gem::Dependency
|
54
50
|
name: bundler
|
55
|
-
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
56
53
|
requirements:
|
57
|
-
- -
|
54
|
+
- - ~>
|
58
55
|
- !ruby/object:Gem::Version
|
59
56
|
version: '1.3'
|
57
|
+
type: :development
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
none: false
|
61
|
-
requirement: !ruby/object:Gem::Requirement
|
62
61
|
requirements:
|
63
|
-
- -
|
62
|
+
- - ~>
|
64
63
|
- !ruby/object:Gem::Version
|
65
64
|
version: '1.3'
|
66
|
-
none: false
|
67
|
-
prerelease: false
|
68
|
-
type: :development
|
69
65
|
- !ruby/object:Gem::Dependency
|
70
66
|
name: rake
|
71
|
-
|
67
|
+
requirement: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
72
69
|
requirements:
|
73
|
-
- -
|
70
|
+
- - ! '>='
|
74
71
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
|
72
|
+
version: '0'
|
73
|
+
type: :development
|
74
|
+
prerelease: false
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
76
|
none: false
|
78
|
-
requirement: !ruby/object:Gem::Requirement
|
79
77
|
requirements:
|
80
|
-
- -
|
78
|
+
- - ! '>='
|
81
79
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
-
MA==
|
84
|
-
none: false
|
85
|
-
prerelease: false
|
86
|
-
type: :development
|
80
|
+
version: '0'
|
87
81
|
- !ruby/object:Gem::Dependency
|
88
82
|
name: rspec
|
89
|
-
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
90
85
|
requirements:
|
91
|
-
- -
|
86
|
+
- - ! '>='
|
92
87
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
94
|
-
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
92
|
none: false
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
93
|
requirements:
|
98
|
-
- -
|
94
|
+
- - ! '>='
|
99
95
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
101
|
-
MA==
|
102
|
-
none: false
|
103
|
-
prerelease: false
|
104
|
-
type: :development
|
96
|
+
version: '0'
|
105
97
|
- !ruby/object:Gem::Dependency
|
106
98
|
name: simplecov
|
107
|
-
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
108
101
|
requirements:
|
109
|
-
- -
|
102
|
+
- - ! '>='
|
110
103
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
112
|
-
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
108
|
none: false
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
109
|
requirements:
|
116
|
-
- -
|
110
|
+
- - ! '>='
|
117
111
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
type: :development
|
123
|
-
description: |
|
124
|
-
Honeydew is a Ruby driver for UIAutomator which enables automated testing of
|
112
|
+
version: '0'
|
113
|
+
description: ! 'Honeydew is a Ruby driver for UIAutomator which enables automated
|
114
|
+
testing of
|
115
|
+
|
125
116
|
Android devices.
|
117
|
+
|
118
|
+
'
|
126
119
|
email:
|
127
120
|
- scmp-team@amplify.com
|
128
121
|
- jbarker@amplify.com
|
@@ -130,10 +123,10 @@ executables: []
|
|
130
123
|
extensions: []
|
131
124
|
extra_rdoc_files: []
|
132
125
|
files:
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
126
|
+
- .gitignore
|
127
|
+
- .rspec
|
128
|
+
- .ruby-gemset
|
129
|
+
- .ruby-version
|
137
130
|
- Gemfile
|
138
131
|
- LICENSE.txt
|
139
132
|
- README.md
|
@@ -210,35 +203,33 @@ files:
|
|
210
203
|
- spec/honeydew/device_matchers_spec.rb
|
211
204
|
- spec/honeydew/device_spec.rb
|
212
205
|
- spec/spec_helper.rb
|
213
|
-
- server/target/honeydew-server-0.
|
214
|
-
homepage:
|
206
|
+
- server/target/honeydew-server-0.19.0.jar
|
207
|
+
homepage:
|
215
208
|
licenses: []
|
216
|
-
post_install_message:
|
209
|
+
post_install_message:
|
217
210
|
rdoc_options: []
|
218
211
|
require_paths:
|
219
212
|
- lib
|
220
213
|
required_ruby_version: !ruby/object:Gem::Requirement
|
214
|
+
none: false
|
221
215
|
requirements:
|
222
|
-
- -
|
216
|
+
- - ! '>='
|
223
217
|
- !ruby/object:Gem::Version
|
224
|
-
version:
|
225
|
-
MA==
|
226
|
-
none: false
|
218
|
+
version: '0'
|
227
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
|
+
none: false
|
228
221
|
requirements:
|
229
|
-
- -
|
222
|
+
- - ! '>='
|
230
223
|
- !ruby/object:Gem::Version
|
231
|
-
version:
|
232
|
-
MA==
|
233
|
-
none: false
|
224
|
+
version: '0'
|
234
225
|
requirements: []
|
235
|
-
rubyforge_project:
|
236
|
-
rubygems_version: 1.8.
|
237
|
-
signing_key:
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 1.8.25
|
228
|
+
signing_key:
|
238
229
|
specification_version: 3
|
239
230
|
summary: Ruby DSL for controlling Android devices
|
240
231
|
test_files:
|
241
|
-
-
|
232
|
+
- .rspec
|
242
233
|
- examples/rspec/Gemfile
|
243
234
|
- examples/rspec/Rakefile
|
244
235
|
- examples/rspec/spec/browse_spec.rb
|
Binary file
|