bugsnag-maze-runner 7.31.0 → 7.32.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 +4 -4
- data/lib/features/steps/runner_steps.rb +9 -2
- 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.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: d41cfd37f8f7a6b9c1ded38ede7bb1e1bb4bd2f88157fd0e8e06f0eb4509910e
|
|
4
|
+
data.tar.gz: 5094050c79c43ba0715ee9448828bac5c1ce85f2720ce16e61c321347a44417d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d5dee129b92e41a8e021e85192416250bc3ad5f081bc94759873832d210c8c1ede1aa61b085b0238a9c6bfa0ad54e8db6e657faba112e4be2b76a359fdc6084
|
|
7
|
+
data.tar.gz: 730ea82561c6e093967c94acd0d2fcdf94c3d89cdfea68f6084b4c147b46a0e5a3f18021baf5b4896dcd3fe8aed1614e0b3ce2fe8243beff8e1f336dfb129ca9
|
|
@@ -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
|
|
@@ -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
|
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.32.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.32.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-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|