bugsnag-maze-runner 8.17.0 → 8.19.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 +2 -2
- data/lib/maze/bugsnag_config.rb +23 -1
- data/lib/maze/client/appium/bb_client.rb +2 -0
- data/lib/maze/hooks/appium_hooks.rb +1 -1
- data/lib/maze/option/parser.rb +1 -1
- data/lib/maze/plugins/bugsnag_reporting_plugin.rb +3 -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: 93d611bbf91ae8051121f172f519e1be4cd9bbedf841391f859fc865206c1898
|
4
|
+
data.tar.gz: 2c7e18e24ed92d79c054417c51fe6926d8548e20b2dcd1f82dd7813c48a15c2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae3fd32b6e99aaa18ccfe7420bc63085d85667305fc4c6a84de16428d3c99a27119f9fa465cc1a83db37ed85c19bb744ddb7c75e7838ef857da7012123ce79d7
|
7
|
+
data.tar.gz: 2c81d7717b76b1285970e6a2e3c6dd2952f657c9f0fb2d9b3f53ee49cde7513bb4d3217c9b682368f5d251354c0d421e08ef63109d4074a97b4ebc28bd4b996f
|
@@ -95,8 +95,8 @@ InstallPlugin do |config|
|
|
95
95
|
# Add step logging
|
96
96
|
config.filters << Maze::Plugins::LoggingScenariosPlugin.new(config)
|
97
97
|
|
98
|
-
#
|
99
|
-
|
98
|
+
# Add bugsnag failed scenario reporting only if ENV['MAZE_SCENARIO_BUGSNAG_API_KEY'] is present
|
99
|
+
config.filters << Maze::Plugins::BugsnagReportingPlugin.new(config) unless ENV['MAZE_SCENARIO_BUGSNAG_API_KEY'].nil?
|
100
100
|
end
|
101
101
|
|
102
102
|
# Before each scenario
|
data/lib/maze/bugsnag_config.rb
CHANGED
@@ -11,7 +11,6 @@ module Maze
|
|
11
11
|
Bugsnag.configure do |config|
|
12
12
|
config.api_key = ENV['MAZE_BUGSNAG_API_KEY']
|
13
13
|
config.app_version = Maze::VERSION
|
14
|
-
config.discard_classes << 'Test::Unit::AssertionFailedError'
|
15
14
|
config.add_metadata(:'test driver', {
|
16
15
|
'driver type': Maze.driver.class,
|
17
16
|
'device farm': Maze.config.farm,
|
@@ -32,6 +31,7 @@ module Maze
|
|
32
31
|
metadata['job url'] = ENV['BUILDKITE_BUILD_URL'] + "#" + ENV['BUILDKITE_JOB_ID']
|
33
32
|
end
|
34
33
|
end
|
34
|
+
config.middleware.use(AssertErrorMiddleware)
|
35
35
|
config.add_metadata(:'buildkite', metadata)
|
36
36
|
config.project_root = Dir.pwd
|
37
37
|
end
|
@@ -45,5 +45,27 @@ module Maze
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
|
+
|
49
|
+
class AssertErrorMiddleware
|
50
|
+
IGNORE_CLASS_NAME = 'Test::Unit::AssertionFailedError'
|
51
|
+
|
52
|
+
# @param middleware [#call] The next middleware to call
|
53
|
+
def initialize(middleware)
|
54
|
+
@middleware = middleware
|
55
|
+
end
|
56
|
+
|
57
|
+
def call(report)
|
58
|
+
# Only ignore automated notifies with assertion errors
|
59
|
+
automated = report.unhandled
|
60
|
+
|
61
|
+
class_match = report.raw_exceptions.any? do |ex|
|
62
|
+
ex.class.name.eql?(IGNORE_CLASS_NAME)
|
63
|
+
end
|
64
|
+
|
65
|
+
report.ignore! if automated && class_match
|
66
|
+
|
67
|
+
@middleware.call(report)
|
68
|
+
end
|
69
|
+
end
|
48
70
|
end
|
49
71
|
end
|
@@ -75,7 +75,9 @@ module Maze
|
|
75
75
|
}
|
76
76
|
capabilities.deep_merge! BitBarClientUtils.dashboard_capabilities
|
77
77
|
capabilities.deep_merge! BitBarDevices.get_available_device(config.device)
|
78
|
+
capabilities['bitbar:options']['appiumVersion'] = config.appium_version unless config.appium_version.nil?
|
78
79
|
capabilities.deep_merge! JSON.parse(config.capabilities_option)
|
80
|
+
|
79
81
|
capabilities
|
80
82
|
end
|
81
83
|
|
@@ -46,7 +46,6 @@ module Maze
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def after_all
|
49
|
-
@client&.log_run_outro
|
50
49
|
if $success
|
51
50
|
Maze::Plugins::DatadogMetricsPlugin.send_increment('appium.test_succeeded')
|
52
51
|
else
|
@@ -60,6 +59,7 @@ module Maze
|
|
60
59
|
|
61
60
|
def at_exit
|
62
61
|
if @client
|
62
|
+
@client.log_run_outro
|
63
63
|
$logger.info 'Stopping the Appium session'
|
64
64
|
@client.stop_session
|
65
65
|
end
|
data/lib/maze/option/parser.rb
CHANGED
@@ -42,7 +42,7 @@ module Maze
|
|
42
42
|
default: true
|
43
43
|
|
44
44
|
opt Option::BUGSNAG,
|
45
|
-
'Enables reporting to Bugsnag on scenario failure (requires MAZE_BUGSNAG_API_KEY)',
|
45
|
+
'Enables reporting to Bugsnag on scenario failure (requires MAZE_BUGSNAG_API_KEY for errors, MAZE_SCENARIO_BUGSNAG_API_KEY for test failures)',
|
46
46
|
type: :boolean,
|
47
47
|
short: :none,
|
48
48
|
default: true
|
@@ -25,6 +25,9 @@ module Maze
|
|
25
25
|
next unless event.test_case.eql?(test_case) && event.result.failed?
|
26
26
|
|
27
27
|
Bugsnag.notify(event.result.exception) do |bsg_event|
|
28
|
+
|
29
|
+
bsg_event.api_key = ENV['MAZE_SCENARIO_BUGSNAG_API_KEY']
|
30
|
+
|
28
31
|
unless @last_test_step.nil?
|
29
32
|
|
30
33
|
repo = ENV['BUILDKITE_PIPELINE_SLUG']
|
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 = '8.
|
10
|
+
VERSION = '8.19.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: 8.
|
4
|
+
version: 8.19.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: 2024-
|
11
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|