Class: Maze::Configuration
- Inherits:
-
Object
- Object
- Maze::Configuration
- Defined in:
- lib/maze/configuration.rb
Overview
MazeRunner configuration
Instance Attribute Summary collapse
-
#access_key ⇒ Object
Farm access key.
-
#always_log ⇒ Object
Always log all received requests to the console at the end of a scenario.
-
#android_app_files_directory ⇒ Object
Folder to push app files to on Android.
-
#app ⇒ Object
The app that tests will be run against.
-
#app_activity ⇒ Object
The appActivity to be set in the Appium capabilities.
-
#app_bundle_id ⇒ Object
Bundle ID of the test application.
-
#app_package ⇒ Object
The appPackage to be set in the Appium capabilities.
-
#appium_logfile ⇒ Object
The location of the appium server logfile.
-
#appium_server_url ⇒ Object
URL of the Appium server.
-
#appium_version ⇒ Object
Appium version to use.
-
#apple_team_id ⇒ Object
Apple Team Id.
-
#aspecto_repeater_api_key ⇒ Object
API key to use when repeating requests to Bugsnag.
-
#aws_public_ip ⇒ Object
Enables awareness of a public IP address on Buildkite with the Elastic CI Stack for AWS.
-
#bind_address ⇒ Object
Mock server bind address.
-
#browser ⇒ Object
Test browser type.
-
#browser_version ⇒ Object
Test browser version.
-
#bs_local ⇒ Object
Location of the BrowserStackLocal binary (if used).
-
#bugsnag_repeater_api_key ⇒ Object
API key to use when repeating requests to Bugsnag.
-
#capabilities ⇒ Object
Appium capabilities.
-
#capabilities_option ⇒ Object
Appium capabilities provided via the CL.
-
#captured_invalid_requests ⇒ Object
The server endpoints for which invalid requests should be captured and cause tests to fail.
-
#device ⇒ Object
Test device type.
-
#device_id ⇒ Object
Device id for running on local iOS devices.
-
#device_list ⇒ Object
A list of devices to attempt to connect to, in order.
-
#document_server_bind_address ⇒ Object
Document server bind address.
-
#document_server_port ⇒ Object
Document server port.
-
#document_server_root ⇒ Object
Document server root.
-
#enable_bugsnag ⇒ Object
Enables bugsnag reporting.
-
#enable_retries ⇒ Object
Whether retries should be allowed.
-
#enforce_bugsnag_integrity ⇒ Object
Whether presence of the Bugsnag-Integrity header should be enforced.
-
#farm ⇒ Object
Device farm to be used, one of: :bs (BrowserStack) :local (Using Appium Server with a local device) :none (Cucumber-driven testing with no devices).
-
#file_log ⇒ Object
Write received requests to disk for all scenarios.
-
#locator ⇒ Object
Element locator strategy, :id or :accessibility_id.
-
#log_requests ⇒ Object
Console logging of received requests for a test failure.
-
#null_port ⇒ Object
Terminating server bind port.
-
#os ⇒ Object
OS.
-
#os_version ⇒ Object
OS version.
-
#port ⇒ Object
Mock server port.
-
#receive_no_requests_wait ⇒ Object
Time in seconds to wait in the ‘I should receive no requests` step.
-
#receive_requests_slow_threshold ⇒ Object
Time after which requests are deemed to be slow to be received and a warning is logged for.
-
#receive_requests_wait ⇒ Object
Maximum time in seconds to wait in the ‘I wait to receive int error(s)/session(s)/build(s)` steps.
-
#sb_local ⇒ Object
Location of the SmartBear binary (if used).
-
#selenium_server_url ⇒ Object
URL of the Selenium server.
-
#start_appium ⇒ Object
Whether an appium server should be started.
-
#start_tunnel ⇒ Object
Whether the device farm secure tunnel should be started.
-
#username ⇒ Object
Farm username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Set default values.
- #legacy_driver=(value) ⇒ Object
-
#legacy_driver? ⇒ Boolean
Whether the legacy (JSON-WP) Appium driver should be used.
Constructor Details
#initialize ⇒ Configuration
Set default values
8 9 10 11 12 13 14 15 16 |
# File 'lib/maze/configuration.rb', line 8 def initialize self.receive_no_requests_wait = 30 self.receive_requests_wait = 30 self.receive_requests_slow_threshold = 10 self.enforce_bugsnag_integrity = true self.captured_invalid_requests = Set[:errors, :sessions, :builds, :uploads, :sourcemaps] self.android_app_files_directory = nil @legacy_driver = false end |
Instance Attribute Details
#access_key ⇒ Object
Farm access key
126 127 128 |
# File 'lib/maze/configuration.rb', line 126 def access_key @access_key end |
#always_log ⇒ Object
Always log all received requests to the console at the end of a scenario
197 198 199 |
# File 'lib/maze/configuration.rb', line 197 def always_log @always_log end |
#android_app_files_directory ⇒ Object
Folder to push app files to on Android
107 108 109 |
# File 'lib/maze/configuration.rb', line 107 def android_app_files_directory @android_app_files_directory end |
#app ⇒ Object
The app that tests will be run against. Could be one of:
-
a local file path
-
a BrowserStack url for a previously uploaded app (bs://…)
-
on macOS, the name of an installed or previously executed application
95 96 97 |
# File 'lib/maze/configuration.rb', line 95 def app @app end |
#app_activity ⇒ Object
The appActivity to be set in the Appium capabilities
141 142 143 |
# File 'lib/maze/configuration.rb', line 141 def app_activity @app_activity end |
#app_bundle_id ⇒ Object
Bundle ID of the test application
120 121 122 |
# File 'lib/maze/configuration.rb', line 120 def app_bundle_id @app_bundle_id end |
#app_package ⇒ Object
The appPackage to be set in the Appium capabilities
144 145 146 |
# File 'lib/maze/configuration.rb', line 144 def app_package @app_package end |
#appium_logfile ⇒ Object
The location of the appium server logfile
184 185 186 |
# File 'lib/maze/configuration.rb', line 184 def appium_logfile @appium_logfile end |
#appium_server_url ⇒ Object
URL of the Appium server
150 151 152 |
# File 'lib/maze/configuration.rb', line 150 def appium_server_url @appium_server_url end |
#appium_version ⇒ Object
Appium version to use
147 148 149 |
# File 'lib/maze/configuration.rb', line 147 def appium_version @appium_version end |
#apple_team_id ⇒ Object
Apple Team Id
169 170 171 |
# File 'lib/maze/configuration.rb', line 169 def apple_team_id @apple_team_id end |
#aspecto_repeater_api_key ⇒ Object
API key to use when repeating requests to Bugsnag
70 71 72 |
# File 'lib/maze/configuration.rb', line 70 def aspecto_repeater_api_key @aspecto_repeater_api_key end |
#aws_public_ip ⇒ Object
Enables awareness of a public IP address on Buildkite with the Elastic CI Stack for AWS.
76 77 78 |
# File 'lib/maze/configuration.rb', line 76 def aws_public_ip @aws_public_ip end |
#bind_address ⇒ Object
Mock server bind address
23 24 25 |
# File 'lib/maze/configuration.rb', line 23 def bind_address @bind_address end |
#browser ⇒ Object
Test browser type
135 136 137 |
# File 'lib/maze/configuration.rb', line 135 def browser @browser end |
#browser_version ⇒ Object
Test browser version
138 139 140 |
# File 'lib/maze/configuration.rb', line 138 def browser_version @browser_version end |
#bs_local ⇒ Object
Location of the BrowserStackLocal binary (if used)
117 118 119 |
# File 'lib/maze/configuration.rb', line 117 def bs_local @bs_local end |
#bugsnag_repeater_api_key ⇒ Object
API key to use when repeating requests to Bugsnag
73 74 75 |
# File 'lib/maze/configuration.rb', line 73 def bugsnag_repeater_api_key @bugsnag_repeater_api_key end |
#capabilities ⇒ Object
Appium capabilities
86 87 88 |
# File 'lib/maze/configuration.rb', line 86 def capabilities @capabilities end |
#capabilities_option ⇒ Object
Appium capabilities provided via the CL
89 90 91 |
# File 'lib/maze/configuration.rb', line 89 def capabilities_option @capabilities_option end |
#captured_invalid_requests ⇒ Object
The server endpoints for which invalid requests should be captured and cause tests to fail
67 68 69 |
# File 'lib/maze/configuration.rb', line 67 def captured_invalid_requests @captured_invalid_requests end |
#device ⇒ Object
Test device type
129 130 131 |
# File 'lib/maze/configuration.rb', line 129 def device @device end |
#device_id ⇒ Object
Device id for running on local iOS devices
178 179 180 |
# File 'lib/maze/configuration.rb', line 178 def device_id @device_id end |
#device_list ⇒ Object
A list of devices to attempt to connect to, in order
132 133 134 |
# File 'lib/maze/configuration.rb', line 132 def device_list @device_list end |
#document_server_bind_address ⇒ Object
Document server bind address
39 40 41 |
# File 'lib/maze/configuration.rb', line 39 def document_server_bind_address @document_server_bind_address end |
#document_server_port ⇒ Object
Document server port
42 43 44 |
# File 'lib/maze/configuration.rb', line 42 def document_server_port @document_server_port end |
#document_server_root ⇒ Object
Document server root
36 37 38 |
# File 'lib/maze/configuration.rb', line 36 def document_server_root @document_server_root end |
#enable_bugsnag ⇒ Object
Enables bugsnag reporting
64 65 66 |
# File 'lib/maze/configuration.rb', line 64 def enable_bugsnag @enable_bugsnag end |
#enable_retries ⇒ Object
Whether retries should be allowed
61 62 63 |
# File 'lib/maze/configuration.rb', line 61 def enable_retries @enable_retries end |
#enforce_bugsnag_integrity ⇒ Object
Whether presence of the Bugsnag-Integrity header should be enforced
58 59 60 |
# File 'lib/maze/configuration.rb', line 58 def enforce_bugsnag_integrity @enforce_bugsnag_integrity end |
#farm ⇒ Object
Device farm to be used, one of: :bs (BrowserStack) :local (Using Appium Server with a local device) :none (Cucumber-driven testing with no devices)
101 102 103 |
# File 'lib/maze/configuration.rb', line 101 def farm @farm end |
#file_log ⇒ Object
Write received requests to disk for all scenarios
191 192 193 |
# File 'lib/maze/configuration.rb', line 191 def file_log @file_log end |
#locator ⇒ Object
Element locator strategy, :id or :accessibility_id
83 84 85 |
# File 'lib/maze/configuration.rb', line 83 def locator @locator end |
#log_requests ⇒ Object
Console logging of received requests for a test failure
194 195 196 |
# File 'lib/maze/configuration.rb', line 194 def log_requests @log_requests end |
#null_port ⇒ Object
Terminating server bind port
29 30 31 |
# File 'lib/maze/configuration.rb', line 29 def null_port @null_port end |
#os ⇒ Object
OS
172 173 174 |
# File 'lib/maze/configuration.rb', line 172 def os @os end |
#os_version ⇒ Object
OS version
175 176 177 |
# File 'lib/maze/configuration.rb', line 175 def os_version @os_version end |
#port ⇒ Object
Mock server port
26 27 28 |
# File 'lib/maze/configuration.rb', line 26 def port @port end |
#receive_no_requests_wait ⇒ Object
Time in seconds to wait in the ‘I should receive no requests` step
49 50 51 |
# File 'lib/maze/configuration.rb', line 49 def receive_no_requests_wait @receive_no_requests_wait end |
#receive_requests_slow_threshold ⇒ Object
Time after which requests are deemed to be slow to be received and a warning is logged for
55 56 57 |
# File 'lib/maze/configuration.rb', line 55 def receive_requests_slow_threshold @receive_requests_slow_threshold end |
#receive_requests_wait ⇒ Object
Maximum time in seconds to wait in the ‘I wait to receive int error(s)/session(s)/build(s)` steps
52 53 54 |
# File 'lib/maze/configuration.rb', line 52 def receive_requests_wait @receive_requests_wait end |
#sb_local ⇒ Object
Location of the SmartBear binary (if used)
114 115 116 |
# File 'lib/maze/configuration.rb', line 114 def sb_local @sb_local end |
#selenium_server_url ⇒ Object
URL of the Selenium server
153 154 155 |
# File 'lib/maze/configuration.rb', line 153 def selenium_server_url @selenium_server_url end |
#start_appium ⇒ Object
Whether an appium server should be started
181 182 183 |
# File 'lib/maze/configuration.rb', line 181 def start_appium @start_appium end |
#start_tunnel ⇒ Object
Whether the device farm secure tunnel should be started
104 105 106 |
# File 'lib/maze/configuration.rb', line 104 def start_tunnel @start_tunnel end |
#username ⇒ Object
Farm username
123 124 125 |
# File 'lib/maze/configuration.rb', line 123 def username @username end |
Instance Method Details
#legacy_driver=(value) ⇒ Object
160 161 162 |
# File 'lib/maze/configuration.rb', line 160 def legacy_driver=(value) @legacy_driver = value end |
#legacy_driver? ⇒ Boolean
Whether the legacy (JSON-WP) Appium driver should be used
156 157 158 |
# File 'lib/maze/configuration.rb', line 156 def legacy_driver? @legacy_driver end |