bugsnag-maze-runner 9.5.0 → 9.7.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/support/internal_hooks.rb +13 -9
- data/lib/maze/bugsnag_config.rb +21 -0
- data/lib/maze/client/appium/bs_devices.rb +1 -17
- data/lib/maze/server.rb +6 -0
- data/lib/maze/servlets/command_servlet.rb +26 -15
- data/lib/maze.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f948d5bf3980cb7514127f60fbecb2ffdb4484c8d19a484e39ebccaaaebda535
|
4
|
+
data.tar.gz: efb5c22b4c81824d63c2762ea0792ad6316dc8744660042b4c1d6357eb8b7a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 100b68e6b60360ea1a0bad3eb51c2b7e28fce9328e0ebc5a8bfeba089621714cfb834d7c4ae568f4c88c7399ff2e2b0fef351cbf8dd97397b3fb4da5cd39644b
|
7
|
+
data.tar.gz: ba9d6bbf2e966981d14be78688c119967278d662b5c0cc166fedba5302c829a3e9b2e93a0c4dfefc30893c5a9cebd09e1f7408de7c71ee7986d3fe89995eb748
|
@@ -238,17 +238,21 @@ AfterAll do
|
|
238
238
|
# Ensure the logger output is in the correct location
|
239
239
|
Maze::Hooks::LoggerHooks.after_all
|
240
240
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
241
|
+
if Maze.config.file_log
|
242
|
+
# create a zip file from the maze_output directory
|
243
|
+
maze_output = File.join(Dir.pwd, 'maze_output')
|
244
|
+
maze_output_zip = File.join(Dir.pwd, 'maze_output.zip')
|
245
|
+
|
246
|
+
# zip a folder with files and subfolders
|
247
|
+
Zip::File.open(maze_output_zip, Zip::File::CREATE) do |zipfile|
|
248
|
+
Dir["#{maze_output}/**/**"].each do |file|
|
249
|
+
zipfile.add(file.sub(Dir.pwd + '/', ''), file)
|
250
|
+
end
|
247
251
|
end
|
248
|
-
end
|
249
252
|
|
250
|
-
|
251
|
-
|
253
|
+
# Move the zip file to the maze_output folder
|
254
|
+
FileUtils.mv(maze_output_zip, maze_output)
|
255
|
+
end
|
252
256
|
|
253
257
|
metrics = Maze::MetricsProcessor.new(Maze::Server.metrics)
|
254
258
|
metrics.process
|
data/lib/maze/bugsnag_config.rb
CHANGED
@@ -32,6 +32,7 @@ module Maze
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
config.middleware.use(AssertErrorMiddleware)
|
35
|
+
config.middleware.use(AmbiguousErrorMiddleware)
|
35
36
|
config.add_metadata(:'buildkite', metadata)
|
36
37
|
config.project_root = Dir.pwd
|
37
38
|
end
|
@@ -67,5 +68,25 @@ module Maze
|
|
67
68
|
@middleware.call(report)
|
68
69
|
end
|
69
70
|
end
|
71
|
+
|
72
|
+
class AmbiguousErrorMiddleware
|
73
|
+
AMBIGUOUS_ERROR_CLASSES = [
|
74
|
+
'Selenium::WebDriver::Error::ServerError',
|
75
|
+
'Selenium::WebDriver::Error::UnknownError'
|
76
|
+
]
|
77
|
+
|
78
|
+
def initialize(middleware)
|
79
|
+
@middleware = middleware
|
80
|
+
end
|
81
|
+
|
82
|
+
def call(report)
|
83
|
+
first_ex = report.raw_exceptions.first
|
84
|
+
if AMBIGUOUS_ERROR_CLASSES.include?(first_ex.class.name)
|
85
|
+
report.grouping_hash = first_ex.class.name.to_s + first_ex.message.to_s
|
86
|
+
end
|
87
|
+
|
88
|
+
@middleware.call(report)
|
89
|
+
end
|
90
|
+
end
|
70
91
|
end
|
71
92
|
end
|
@@ -84,10 +84,8 @@ module Maze
|
|
84
84
|
'IOS_16' => make_ios_hash('iPhone 14', '16'),
|
85
85
|
'IOS_15' => make_ios_hash('iPhone 11 Pro', '15'),
|
86
86
|
'IOS_14' => make_ios_hash('iPhone 11', '14'),
|
87
|
-
'IOS_13' => make_ios_hash('iPhone
|
87
|
+
'IOS_13' => make_ios_hash('iPhone 11', '13'),
|
88
88
|
'IOS_12' => make_ios_hash('iPhone 8', '12'),
|
89
|
-
'IOS_11' => make_ios_hash('iPhone 8', '11'),
|
90
|
-
'IOS_10' => make_ios_hash('iPhone 7', '10')
|
91
89
|
}
|
92
90
|
|
93
91
|
# Specific Android devices
|
@@ -100,10 +98,8 @@ module Maze
|
|
100
98
|
|
101
99
|
add_android 'Google Pixel 2', '9.0', hash # ANDROID_9_0_GOOGLE_PIXEL_2
|
102
100
|
add_android 'Samsung Galaxy Note 9', '8.1', hash # ANDROID_8_1_SAMSUNG_GALAXY_NOTE_9
|
103
|
-
add_android 'Samsung Galaxy J7 Prime', '8.1', hash # ANDROID_8_1_SAMSUNG_GALAXY_J7_PRIME
|
104
101
|
add_android 'Samsung Galaxy Tab S4', '8.1', hash # ANDROID_8_1_SAMSUNG_GALAXY_TAB_S4
|
105
102
|
add_android 'Samsung Galaxy Tab S3', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_TAB_S3
|
106
|
-
add_android 'Google Pixel 2', '8.0', hash # ANDROID_8_0_GOOGLE_PIXEL_2
|
107
103
|
add_android 'Samsung Galaxy S9', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_S9
|
108
104
|
add_android 'Samsung Galaxy S9 Plus', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_S9_PLUS
|
109
105
|
|
@@ -119,18 +115,6 @@ module Maze
|
|
119
115
|
add_ios 'iPhone 14 Pro', '16.0', hash # IOS_16_0_IPHONE_14_PRO
|
120
116
|
add_ios 'iPhone 14 Pro Max', '16.0', hash # IOS_16_0_IPHONE_14_PRO_MAX
|
121
117
|
|
122
|
-
add_ios 'iPhone 8 Plus', '11.0', hash # IOS_11_0_IPHONE_8_PLUS
|
123
|
-
add_ios 'iPhone X', '11.0', hash # IOS_11_0_IPHONE_X
|
124
|
-
add_ios 'iPhone SE', '11.0', hash # IOS_11_0_IPHONE_SE
|
125
|
-
add_ios 'iPhone 6', '11.0', hash # IOS_11_0_IPHONE_6
|
126
|
-
add_ios 'iPhone 6S', '11.0', hash # IOS_11_0_IPHONE_6S
|
127
|
-
add_ios 'iPhone 6S Plus', '11.0', hash # IOS_11_0_IPHONE_6S_PLUS
|
128
|
-
add_ios 'iPad 5th', '11.0', hash # IOS_11_0_IPAD_5TH
|
129
|
-
add_ios 'iPad Mini 4', '11.0', hash # IOS_11_0_IPAD_MINI_4
|
130
|
-
add_ios 'iPad Pro 9.7 2016', '11.0', hash # IOS_11_0_IPAD_PRO_9_7_2016
|
131
|
-
add_ios 'iPad 6th', '11.0', hash # IOS_11_0_IPAD_6TH
|
132
|
-
add_ios 'iPad Pro 12.9', '11.0', hash # IOS_11_0_IPAD_PRO_12_9
|
133
|
-
|
134
118
|
hash
|
135
119
|
end
|
136
120
|
end
|
data/lib/maze/server.rb
CHANGED
@@ -15,6 +15,12 @@ module Maze
|
|
15
15
|
DEFAULT_STATUS_CODE = 200
|
16
16
|
|
17
17
|
class << self
|
18
|
+
|
19
|
+
# Records the previous command UUID sent to the test fixture
|
20
|
+
#
|
21
|
+
# @return [String] The UUID of the last command sent
|
22
|
+
attr_accessor :last_command_uuid
|
23
|
+
|
18
24
|
# Sets the response delay generator.
|
19
25
|
#
|
20
26
|
# @param generator [Maze::Generator] The new generator
|
@@ -19,17 +19,7 @@ module Maze
|
|
19
19
|
|
20
20
|
if request.query.empty?
|
21
21
|
# Non-idempotent mode - return the "current" command
|
22
|
-
|
23
|
-
|
24
|
-
if commands.size_remaining == 0
|
25
|
-
response.body = NOOP_COMMAND
|
26
|
-
response.status = 200
|
27
|
-
else
|
28
|
-
command = commands.current
|
29
|
-
response.body = JSON.pretty_generate(command)
|
30
|
-
response.status = 200
|
31
|
-
commands.next
|
32
|
-
end
|
22
|
+
send_current_command(response)
|
33
23
|
else
|
34
24
|
# Idempotent mode
|
35
25
|
after_uuid = request.query['after']
|
@@ -44,6 +34,21 @@ module Maze
|
|
44
34
|
response.header['Access-Control-Allow-Origin'] = '*'
|
45
35
|
end
|
46
36
|
|
37
|
+
def send_current_command(response)
|
38
|
+
commands = Maze::Server.commands
|
39
|
+
|
40
|
+
if commands.size_remaining == 0
|
41
|
+
response.body = NOOP_COMMAND
|
42
|
+
response.status = 200
|
43
|
+
else
|
44
|
+
command = commands.current
|
45
|
+
Server.last_command_uuid = command[:uuid]
|
46
|
+
response.body = JSON.pretty_generate(command)
|
47
|
+
response.status = 200
|
48
|
+
commands.next
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
47
52
|
def command_after(uuid, response)
|
48
53
|
commands = Maze::Server.commands
|
49
54
|
if uuid.empty?
|
@@ -52,14 +57,20 @@ module Maze
|
|
52
57
|
index = commands.all.find_index {|command| command[:uuid] == uuid }
|
53
58
|
end
|
54
59
|
if index.nil?
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
60
|
+
# If the UUID given matches the last UUID sent by the server, we can assume the fixture has failed to reset
|
61
|
+
if uuid.eql?(Server.last_command_uuid)
|
62
|
+
send_current_command(response)
|
63
|
+
else
|
64
|
+
msg = "Request invalid - there is no command with a UUID of #{uuid} to follow on from"
|
65
|
+
$logger.error msg
|
66
|
+
response.body = msg
|
67
|
+
response.status = 400
|
68
|
+
end
|
59
69
|
else
|
60
70
|
if index + 1 < commands.size_all
|
61
71
|
# Respond with the next command in the queue
|
62
72
|
command = commands.get(index + 1)
|
73
|
+
Server.last_command_uuid = command[:uuid]
|
63
74
|
command_json = JSON.pretty_generate(command)
|
64
75
|
response.body = command_json
|
65
76
|
response.status = 200
|
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 = '9.
|
10
|
+
VERSION = '9.7.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: 9.
|
4
|
+
version: 9.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kirkland
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -454,11 +454,11 @@ files:
|
|
454
454
|
- lib/maze/wait.rb
|
455
455
|
- lib/utils/deep_merge.rb
|
456
456
|
- lib/utils/selenium_money_patch.rb
|
457
|
-
homepage:
|
457
|
+
homepage:
|
458
458
|
licenses:
|
459
459
|
- MIT
|
460
460
|
metadata: {}
|
461
|
-
post_install_message:
|
461
|
+
post_install_message:
|
462
462
|
rdoc_options: []
|
463
463
|
require_paths:
|
464
464
|
- lib
|
@@ -473,8 +473,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
473
473
|
- !ruby/object:Gem::Version
|
474
474
|
version: '0'
|
475
475
|
requirements: []
|
476
|
-
rubygems_version: 3.
|
477
|
-
signing_key:
|
476
|
+
rubygems_version: 3.5.3
|
477
|
+
signing_key:
|
478
478
|
specification_version: 4
|
479
479
|
summary: Bugsnag API request validation harness
|
480
480
|
test_files: []
|