quke 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.config.example.yml +82 -57
- data/CHANGELOG.md +7 -2
- data/lib/quke/configuration.rb +11 -12
- data/lib/quke/driver_configuration.rb +7 -33
- data/lib/quke/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5b2936d4f14ba229cb09e51e452e38e7bec283d4f451cff78c6e1bdd7db14753
|
|
4
|
+
data.tar.gz: 23fac38b040117047d0153a53d015e91d7f17d74a55884f7b0dd1efd1b8af597
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1444e484da2cbaca94f551a75dcae882b909762cf090d653edd8cbf0bf1161ad6d6c6a5ceadd41f1cdddd8d4744d601b723a64610288cc76f678a555b9cd8081
|
|
7
|
+
data.tar.gz: c061de8ca68f54f5063264182e2a340f6f8f0819f47c3e991e6e97cdfaf3e2daf11d8662f9ad402277c97099ced4a1f7b58ef0e7d3212b4f10a98f7880308502
|
data/.config.example.yml
CHANGED
|
@@ -96,63 +96,88 @@ proxy:
|
|
|
96
96
|
# Please see https://www.browserstack.com/automate/capabilities for more details
|
|
97
97
|
browserstack:
|
|
98
98
|
# To run your tests with browserstack you must provide a username and auth_key
|
|
99
|
-
# as a minimum
|
|
99
|
+
# as a minimum.
|
|
100
|
+
# If you don't want to put these credentials in the config file (because you
|
|
101
|
+
# want to commit it to source control), Quke will also check for the existance
|
|
102
|
+
# of the environment variables BROWSERSTACK_USERNAME and BROWSERSTACK_AUTH_KEY
|
|
100
103
|
username: jdoe
|
|
101
104
|
auth_key: 123456789ABCDE
|
|
102
105
|
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
build
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
106
|
+
# Anything set under capabilities will be passed directly by Quke to
|
|
107
|
+
# browserstack as means of configuring the test.
|
|
108
|
+
# So the config keys (e.g. build, project, name) you set should match a real
|
|
109
|
+
# browserstack capability, and the value exist in the range it expects. See
|
|
110
|
+
# for further reference on browserstack capabilities
|
|
111
|
+
# https://www.browserstack.com/automate/capabilities
|
|
112
|
+
# https://www.browserstack.com/automate/ruby#configure-capabilities
|
|
113
|
+
capabilities:
|
|
114
|
+
# Keep track of all your automated tests using the build and project
|
|
115
|
+
# capabilities. Group your tests into builds, and builds further into
|
|
116
|
+
# projects
|
|
117
|
+
project: 'Adding browserstack support'
|
|
118
|
+
build: 'Version 1'
|
|
119
|
+
# Allows you to specify an identifier for the test run.
|
|
120
|
+
# If you intend to repeat a test this might not be that applicable, but in
|
|
121
|
+
# the case of one off tests it might be useful
|
|
122
|
+
name: 'Testing google search'
|
|
123
|
+
|
|
124
|
+
# To avoid invalid certificate errors while testing set acceptSslCerts to
|
|
125
|
+
# true. This is not listed on the general capabilities page but is here
|
|
126
|
+
# https://www.browserstack.com/automate/ruby#self-signed-certificates
|
|
127
|
+
acceptSslCerts: true
|
|
128
|
+
# Required if you want to generate screenshots at various steps in your test
|
|
129
|
+
# test. Browserstack default is false
|
|
130
|
+
browserstack.debug: true
|
|
131
|
+
# Required if you want to enable video recording during your test.
|
|
132
|
+
# Browserstack default is true
|
|
133
|
+
browserstack.video: true
|
|
134
|
+
# Another setting not listed, setting the following will prevent any values
|
|
135
|
+
# you pass in, for example when filling in a form, from appearing in the
|
|
136
|
+
# logs. General use case is to prevent passwords being exposed, but beware
|
|
137
|
+
# that all input will be masked in the logs if set.
|
|
138
|
+
browserstack.maskSendKeys: true
|
|
139
|
+
|
|
140
|
+
# MOBILE testing and DESKTOP testing are essentially diametric; you set one
|
|
141
|
+
# or the other but not both. Some examples seem to put logic in place to
|
|
142
|
+
# test the options passed in and then set the capabilities accordingly,
|
|
143
|
+
# however Browserstack handles this and has what will happen documented
|
|
144
|
+
# https://www.browserstack.com/automate/capabilities#capabilities-parameter-override
|
|
145
|
+
#
|
|
146
|
+
# MOBILE testing
|
|
147
|
+
# The docs are a little confusing but essentially if you want to test against
|
|
148
|
+
# mobile devices you need to define 1 set of capabilities, and if desktop
|
|
149
|
+
# another
|
|
150
|
+
# -----
|
|
151
|
+
# OS you want to test. Accepted values are MAC, WIN8, XP, WINDOWS, ANY,
|
|
152
|
+
# ANDROID. Browserstack default is ANY
|
|
153
|
+
platform: MAC
|
|
154
|
+
# Browser you want to test. Accepted values firefox, chrome, internet
|
|
155
|
+
# explorer,safari, opera, iPad, iPhone, android. Browserstack default is
|
|
156
|
+
# chrome
|
|
157
|
+
browserName: iPhone
|
|
158
|
+
# Browser version you want to test. See the docs for the full list of
|
|
159
|
+
# available versions. Browserstack default is latest stable version of
|
|
160
|
+
# browser selected
|
|
161
|
+
version: '49'
|
|
162
|
+
# Device you want to test on. See the docs for the full list of available.
|
|
163
|
+
device: 'iPhone 5'
|
|
164
|
+
#
|
|
165
|
+
# DESKTOP testing
|
|
166
|
+
# -----
|
|
167
|
+
# OS you want to test. Accepted values are WINDOWS, OS X. If both OS and
|
|
168
|
+
# platform are set, OS will take precedence
|
|
169
|
+
os: WINDOWS
|
|
170
|
+
# OS version you want to test. Accepted values are
|
|
171
|
+
# Windows: XP, 7, 8, 8.1 and 10
|
|
172
|
+
# OS X: Snow Leopard, Lion, Mountain Lion, Mavericks, Yosemite, El Capitan
|
|
173
|
+
os_version: '8.1'
|
|
174
|
+
# Browser you want to test. Accepted values are Firefox, Safari, IE, Chrome,
|
|
175
|
+
# Opera
|
|
176
|
+
browser: chrome
|
|
177
|
+
# Browser version you want to test. See the docs for the full list of
|
|
178
|
+
# available versions
|
|
179
|
+
browser_version: '49'
|
|
180
|
+
# Set the resolution of VM before beginning of your test.
|
|
181
|
+
# See docs https://www.browserstack.com/automate/capabilities for full list
|
|
182
|
+
# of accepted values, as it is also OS dependent
|
|
183
|
+
resolution: '1024x768'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [v0.3.2](https://github.com/DEFRA/quke/tree/v0.3.2) (2017-06-12)
|
|
4
|
+
[Full Changelog](https://github.com/DEFRA/quke/compare/v0.3.1...v0.3.2)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Closed issues:**
|
|
7
|
+
|
|
8
|
+
- Enable ability to override driver settings [\#58](https://github.com/DEFRA/quke/issues/58)
|
|
6
9
|
|
|
7
10
|
**Merged pull requests:**
|
|
8
11
|
|
|
12
|
+
- Add option to override js\_errors for phantomjs [\#65](https://github.com/DEFRA/quke/pull/65) ([Cruikshanks](https://github.com/Cruikshanks))
|
|
13
|
+
- \[ci skip\] Updating CHANGELOG.md [\#63](https://github.com/DEFRA/quke/pull/63) ([Cruikshanks](https://github.com/Cruikshanks))
|
|
9
14
|
- Update version number \(forgot during last change!\) [\#62](https://github.com/DEFRA/quke/pull/62) ([Cruikshanks](https://github.com/Cruikshanks))
|
|
10
15
|
|
|
11
16
|
## [v0.3.1](https://github.com/DEFRA/quke/tree/v0.3.1) (2017-06-12)
|
data/lib/quke/configuration.rb
CHANGED
|
@@ -129,7 +129,7 @@ module Quke #:nodoc:
|
|
|
129
129
|
@data['javascript_errors']
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
# Return the hash of +browserstack+ options.
|
|
132
|
+
# Return the hash of all +browserstack+ options.
|
|
133
133
|
#
|
|
134
134
|
# If you select the browserstack driver, there are a number of options you
|
|
135
135
|
# can pass through to setup your browserstack tests, username and auth_key
|
|
@@ -156,7 +156,7 @@ module Quke #:nodoc:
|
|
|
156
156
|
# It is mainly used when determining whether to apply proxy server settings
|
|
157
157
|
# to the different drivers when registering them with Capybara.
|
|
158
158
|
def use_proxy?
|
|
159
|
-
proxy['host']
|
|
159
|
+
proxy['host'] != ''
|
|
160
160
|
end
|
|
161
161
|
|
|
162
162
|
def custom
|
|
@@ -180,6 +180,7 @@ module Quke #:nodoc:
|
|
|
180
180
|
|
|
181
181
|
# rubocop:disable Metrics/AbcSize
|
|
182
182
|
# rubocop:disable Metrics/CyclomaticComplexity
|
|
183
|
+
# rubocop:disable Metrics/MethodLength
|
|
183
184
|
# rubocop:disable Metrics/PerceivedComplexity
|
|
184
185
|
def default_data!(data)
|
|
185
186
|
data.merge(
|
|
@@ -196,29 +197,27 @@ module Quke #:nodoc:
|
|
|
196
197
|
# will be 'true', so we flip it back to 'false' with !.
|
|
197
198
|
# Else the condition fails and we get 'false', which when flipped gives
|
|
198
199
|
# us 'true', which is what we want the default value to be
|
|
200
|
+
# rubocop:disable Style/InverseMethods
|
|
199
201
|
'javascript_errors' => !(data['javascript_errors'].to_s.downcase.strip == 'false'),
|
|
202
|
+
# rubocop:enable Style/InverseMethods
|
|
200
203
|
'custom' => (data['custom'] || nil)
|
|
201
204
|
)
|
|
202
205
|
end
|
|
203
206
|
# rubocop:enable Metrics/AbcSize
|
|
204
207
|
# rubocop:enable Metrics/CyclomaticComplexity
|
|
208
|
+
# rubocop:enable Metrics/MethodLength
|
|
205
209
|
# rubocop:enable Metrics/PerceivedComplexity
|
|
206
210
|
|
|
207
|
-
# rubocop:disable Metrics/
|
|
211
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
|
208
212
|
def browserstack_data(data)
|
|
209
213
|
data = {} if data.nil?
|
|
210
214
|
data.merge(
|
|
211
|
-
'username' => (ENV['BROWSERSTACK_USERNAME'] ||
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
),
|
|
215
|
-
'auth_key' => (ENV['BROWSERSTACK_AUTH_KEY'] ||
|
|
216
|
-
data['auth_key'] ||
|
|
217
|
-
''
|
|
218
|
-
)
|
|
215
|
+
'username' => (ENV['BROWSERSTACK_USERNAME'] || data['username'] || ''),
|
|
216
|
+
'auth_key' => (ENV['BROWSERSTACK_AUTH_KEY'] || data['auth_key'] || ''),
|
|
217
|
+
'capabilities' => data['capabilities'] || {}
|
|
219
218
|
)
|
|
220
219
|
end
|
|
221
|
-
# rubocop:enable Metrics/
|
|
220
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
|
222
221
|
|
|
223
222
|
def proxy_data(data)
|
|
224
223
|
data = {} if data.nil?
|
|
@@ -268,46 +268,20 @@ module Quke #:nodoc:
|
|
|
268
268
|
# For further reference on browserstack capabilities
|
|
269
269
|
# https://www.browserstack.com/automate/capabilities
|
|
270
270
|
# https://www.browserstack.com/automate/ruby#configure-capabilities
|
|
271
|
-
# rubocop:disable Metrics/MethodLength
|
|
272
|
-
# rubocop:disable Metrics/AbcSize
|
|
273
271
|
def browserstack
|
|
272
|
+
# Documentation and the code for this class can be found here
|
|
273
|
+
# http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Remote/Capabilities
|
|
274
|
+
# https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/remote/capabilities.rb
|
|
274
275
|
capabilities = Selenium::WebDriver::Remote::Capabilities.new
|
|
275
276
|
|
|
276
|
-
|
|
277
|
-
capabilities['project'] = config.browserstack['project']
|
|
278
|
-
capabilities['name'] = config.browserstack['name']
|
|
279
|
-
|
|
280
|
-
# This and the following section are essentially diametric; you set one
|
|
281
|
-
# or the other but not both. Some examples seem to put logic in place to
|
|
282
|
-
# test the options passed in and then set the capabilities accordingly,
|
|
283
|
-
# however Browserstack handles this and has what will happen documented
|
|
284
|
-
# https://www.browserstack.com/automate/capabilities#capabilities-parameter-override
|
|
285
|
-
capabilities['platform'] = config.browserstack['platform']
|
|
286
|
-
capabilities['browserName'] = config.browserstack['browserName']
|
|
287
|
-
capabilities['version'] = config.browserstack['version']
|
|
288
|
-
capabilities['device'] = config.browserstack['device']
|
|
289
|
-
|
|
290
|
-
capabilities['os'] = config.browserstack['os']
|
|
291
|
-
capabilities['os_version'] = config.browserstack['os_version']
|
|
292
|
-
capabilities['browser'] = config.browserstack['browser']
|
|
293
|
-
capabilities['browser_version'] = config.browserstack['browser_version']
|
|
294
|
-
capabilities['resolution'] = config.browserstack['resolution']
|
|
295
|
-
# -----
|
|
277
|
+
browserstack_capabilities = config.browserstack['capabilities']
|
|
296
278
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
279
|
+
browserstack_capabilities.each do |key, value|
|
|
280
|
+
capabilities[key] = value
|
|
281
|
+
end
|
|
300
282
|
|
|
301
|
-
capabilities['browserstack.debug'] = config.browserstack['debug']
|
|
302
|
-
capabilities['browserstack.video'] = config.browserstack['video']
|
|
303
|
-
|
|
304
|
-
# At this point Quke does not support local testing so we specifically
|
|
305
|
-
# tell Browserstack we're not doing this
|
|
306
|
-
capabilities['browserstack.local'] = 'false'
|
|
307
283
|
capabilities
|
|
308
284
|
end
|
|
309
|
-
# rubocop:enable Metrics/AbcSize
|
|
310
|
-
# rubocop:enable Metrics/MethodLength
|
|
311
285
|
|
|
312
286
|
end
|
|
313
287
|
|
data/lib/quke/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quke
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alan Cruikshanks
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|
|
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
279
279
|
version: '0'
|
|
280
280
|
requirements: []
|
|
281
281
|
rubyforge_project:
|
|
282
|
-
rubygems_version: 2.
|
|
282
|
+
rubygems_version: 2.7.3
|
|
283
283
|
signing_key:
|
|
284
284
|
specification_version: 4
|
|
285
285
|
summary: A gem to simplify creating acceptance tests using Cucumber
|