bugsnag-maze-runner 7.31.0 → 7.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/features/steps/runner_steps.rb +9 -2
- data/lib/features/support/internal_hooks.rb +1 -0
- data/lib/maze/client/appium/bb_client.rb +1 -44
- data/lib/maze/client/bb_client_utils.rb +43 -0
- data/lib/maze/client/selenium/bb_client.rb +1 -0
- data/lib/maze/client/selenium/bs_browsers.yml +14 -0
- data/lib/maze.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aab5b610b96392d2b22fb47886968654c633723023bc711e8a217a73a94de794
|
4
|
+
data.tar.gz: ab16f8fec95ddb5bbbe1a0712cbfb701ed58aebacce0905e31eb5d598aa91532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54ee971882fbf00ebd34c45c879ca31aa2b24e09a1f7985fc285514b8a8777dccc837e766700b7e4d5329e9d52537d5d6a7a74b5a8263515071e661968052459
|
7
|
+
data.tar.gz: e46b2261aaf9ab464e23f7ef6169c44c7bc64079d9cf96f116e58832c4f475c1c0ce940ada86f148bf5a6da9369e344b8196a4890a824c227e7f26f1f7348d98
|
@@ -243,7 +243,7 @@ Then('I wait for the shell prompt {string}') do |expected_prompt|
|
|
243
243
|
wait = Maze::Wait.new(timeout: Maze.config.receive_requests_wait)
|
244
244
|
shell = Maze::Runner.interactive_session
|
245
245
|
|
246
|
-
success = wait.until { shell.current_buffer
|
246
|
+
success = wait.until { expected_prompt == sanitized(shell.current_buffer) }
|
247
247
|
|
248
248
|
Maze.check.true(success, "The current output line \"#{shell.current_buffer}\" did not match \"#{expected_prompt}\"")
|
249
249
|
end
|
@@ -265,12 +265,19 @@ Then('I wait for the shell to output {string} to stdout') do |expected_line|
|
|
265
265
|
current_shell = Maze::Runner.interactive_session
|
266
266
|
|
267
267
|
success = wait.until do
|
268
|
-
current_shell.stdout_lines.any?
|
268
|
+
current_shell.stdout_lines.any? do |line|
|
269
|
+
# Remove inconsequential escape codes
|
270
|
+
expected_line == sanitized(line)
|
271
|
+
end
|
269
272
|
end
|
270
273
|
|
271
274
|
Maze.check.true(success, "No output lines from #{current_shell.stdout_lines} matched #{expected_line}")
|
272
275
|
end
|
273
276
|
|
277
|
+
def sanitized(line)
|
278
|
+
line.sub "\e[?25h", '' # Make cursor visible
|
279
|
+
end
|
280
|
+
|
274
281
|
# Verify a string using a regex in the stdout logs
|
275
282
|
#
|
276
283
|
# @step_input regex_matcher [String] The regex expected to match a line in stdout logs
|
@@ -145,6 +145,7 @@ After do |scenario|
|
|
145
145
|
$stdout.puts '^^^ +++'
|
146
146
|
output_received_requests('errors')
|
147
147
|
output_received_requests('sessions')
|
148
|
+
output_received_requests('traces')
|
148
149
|
output_received_requests('builds')
|
149
150
|
output_received_requests('logs')
|
150
151
|
output_received_requests('invalid requests')
|
@@ -39,7 +39,7 @@ module Maze
|
|
39
39
|
'testTimeout' => 7200
|
40
40
|
}
|
41
41
|
}
|
42
|
-
capabilities.deep_merge! dashboard_capabilities
|
42
|
+
capabilities.deep_merge! BitBarClientUtils.dashboard_capabilities
|
43
43
|
capabilities.deep_merge! BitBarDevices.get_available_device(config.device)
|
44
44
|
capabilities.deep_merge! JSON.parse(config.capabilities_option)
|
45
45
|
capabilities
|
@@ -65,49 +65,6 @@ module Maze
|
|
65
65
|
Maze::Client::BitBarClientUtils.stop_local_tunnel
|
66
66
|
end
|
67
67
|
end
|
68
|
-
|
69
|
-
# Determines capabilities used to organise sessions in the BitBar dashboard.
|
70
|
-
#
|
71
|
-
# @return [Hash] A hash containing the capabilities.
|
72
|
-
def dashboard_capabilities
|
73
|
-
|
74
|
-
# Determine project name
|
75
|
-
if ENV['BUILDKITE']
|
76
|
-
$logger.info 'Using BUILDKITE_PIPELINE_SLUG for BitBar project name'
|
77
|
-
project = ENV['BUILDKITE_PIPELINE_SLUG']
|
78
|
-
else
|
79
|
-
# Attempt to use the current git repo
|
80
|
-
output, status = Maze::Runner.run_command('git rev-parse --show-toplevel')
|
81
|
-
if status == 0
|
82
|
-
project = File.basename(output[0].strip)
|
83
|
-
else
|
84
|
-
$logger.warn 'Unable to determine project name, consider running Maze Runner from within a Git repository'
|
85
|
-
project = 'Unknown'
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
# Test run
|
90
|
-
if ENV['BUILDKITE']
|
91
|
-
bk_retry = ENV['BUILDKITE_RETRY_COUNT']
|
92
|
-
retry_string = if !bk_retry.nil? && bk_retry.to_i > 1
|
93
|
-
" (#{bk_retry})"
|
94
|
-
else
|
95
|
-
''
|
96
|
-
end
|
97
|
-
test_run = "#{ENV['BUILDKITE_BUILD_NUMBER']} - #{ENV['BUILDKITE_LABEL']}#{retry_string}"
|
98
|
-
else
|
99
|
-
test_run = Maze.run_uuid
|
100
|
-
end
|
101
|
-
|
102
|
-
$logger.info "BitBar project name: #{project}"
|
103
|
-
$logger.info "BitBar test run: #{test_run}"
|
104
|
-
{
|
105
|
-
'bitbar:options' => {
|
106
|
-
bitbar_project: project,
|
107
|
-
bitbar_testrun: test_run
|
108
|
-
}
|
109
|
-
}
|
110
|
-
end
|
111
68
|
end
|
112
69
|
end
|
113
70
|
end
|
@@ -170,6 +170,49 @@ module Maze
|
|
170
170
|
File.delete(BB_KILL_FILE) if File.exist?(BB_KILL_FILE)
|
171
171
|
end
|
172
172
|
|
173
|
+
# Determines capabilities used to organise sessions in the BitBar dashboard.
|
174
|
+
#
|
175
|
+
# @return [Hash] A hash containing the capabilities.
|
176
|
+
def dashboard_capabilities
|
177
|
+
|
178
|
+
# Determine project name
|
179
|
+
if ENV['BUILDKITE']
|
180
|
+
$logger.info 'Using BUILDKITE_PIPELINE_SLUG for BitBar project name'
|
181
|
+
project = ENV['BUILDKITE_PIPELINE_SLUG']
|
182
|
+
else
|
183
|
+
# Attempt to use the current git repo
|
184
|
+
output, status = Maze::Runner.run_command('git rev-parse --show-toplevel')
|
185
|
+
if status == 0
|
186
|
+
project = File.basename(output[0].strip)
|
187
|
+
else
|
188
|
+
$logger.warn 'Unable to determine project name, consider running Maze Runner from within a Git repository'
|
189
|
+
project = 'Unknown'
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Test run
|
194
|
+
if ENV['BUILDKITE']
|
195
|
+
bk_retry = ENV['BUILDKITE_RETRY_COUNT']
|
196
|
+
retry_string = if !bk_retry.nil? && bk_retry.to_i > 1
|
197
|
+
" (#{bk_retry})"
|
198
|
+
else
|
199
|
+
''
|
200
|
+
end
|
201
|
+
test_run = "#{ENV['BUILDKITE_BUILD_NUMBER']} - #{ENV['BUILDKITE_LABEL']}#{retry_string}"
|
202
|
+
else
|
203
|
+
test_run = Maze.run_uuid
|
204
|
+
end
|
205
|
+
|
206
|
+
$logger.info "BitBar project name: #{project}"
|
207
|
+
$logger.info "BitBar test run: #{test_run}"
|
208
|
+
{
|
209
|
+
'bitbar:options' => {
|
210
|
+
bitbar_project: project,
|
211
|
+
bitbar_testrun: test_run
|
212
|
+
}
|
213
|
+
}
|
214
|
+
end
|
215
|
+
|
173
216
|
private
|
174
217
|
|
175
218
|
def start_tunnel_thread(cmd)
|
@@ -7,6 +7,7 @@ module Maze
|
|
7
7
|
capabilities = ::Selenium::WebDriver::Remote::Capabilities.new
|
8
8
|
capabilities['bitbar_apiKey'] = config.access_key
|
9
9
|
browsers = YAML.safe_load(File.read("#{__dir__}/bb_browsers.yml"))
|
10
|
+
capabilities.merge! BitBarClientUtils.dashboard_capabilities
|
10
11
|
capabilities.merge! browsers[config.browser]
|
11
12
|
capabilities.merge! JSON.parse(config.capabilities_option)
|
12
13
|
config.capabilities = capabilities
|
@@ -131,6 +131,13 @@ iphone_13:
|
|
131
131
|
osVersion: "15.4"
|
132
132
|
realMobile: true
|
133
133
|
|
134
|
+
iphone_14:
|
135
|
+
browserName: "iphone"
|
136
|
+
device: "iPhone 14"
|
137
|
+
os: "ios"
|
138
|
+
osVersion: "16"
|
139
|
+
realMobile: true
|
140
|
+
|
134
141
|
android_nexus5:
|
135
142
|
browserName: "Android Browser"
|
136
143
|
device: "Google Nexus 5"
|
@@ -159,6 +166,13 @@ android_s8:
|
|
159
166
|
osVersion: "7.0"
|
160
167
|
realMobile: true
|
161
168
|
|
169
|
+
android_pixel_7:
|
170
|
+
browserName: "Android Browser"
|
171
|
+
device: "Google Pixel 7"
|
172
|
+
os: "android"
|
173
|
+
osVersion: "13.0"
|
174
|
+
realMobile: true
|
175
|
+
|
162
176
|
firefox_30:
|
163
177
|
browserName: "firefox"
|
164
178
|
browserVersion: "30"
|
data/lib/maze.rb
CHANGED
@@ -7,7 +7,7 @@ require_relative 'maze/timers'
|
|
7
7
|
# Glues the various parts of MazeRunner together that need to be accessed globally,
|
8
8
|
# providing an alternative to the proliferation of global variables or singletons.
|
9
9
|
module Maze
|
10
|
-
VERSION = '7.
|
10
|
+
VERSION = '7.33.0'
|
11
11
|
|
12
12
|
class << self
|
13
13
|
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag-maze-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kirkland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|