bugsnag-maze-runner 9.27.3 → 9.27.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0311fd0e499a676775d0b02bc1d5a9a73fba218845a531b60e4c2848bfd2f138
4
- data.tar.gz: b38995cabfda41bc015b509ca10185198be47ad65210c7bcb24748c58278679d
3
+ metadata.gz: 87adf6fe40bf417708320af55a4cc71c2e8656e7f79bdd60902b473c2d7aa2b7
4
+ data.tar.gz: 47b1d556a9bf643ada71d5476cffe5f82ca5db36c08238911f964c3ac4d9c4fe
5
5
  SHA512:
6
- metadata.gz: 48a00d3048487f3382bd4b7daeda0a3b27e3cce03037f1bd595d7e1217bdcf21428bd45af8c6d7097f858f655f434d8d8c1d740fb8ca66b78af7dbf88a4e9f9f
7
- data.tar.gz: 40b2f8ba974a603f680a99baa2dced5b3645641e7d6f6eae69188bc5fd3052543c9dffca252bd44fab76bcac7832b6e35144eb116fc43e0d5fe93289584804a3
6
+ metadata.gz: ad05007ba4678a5a45811cae40ddbe6be9fce37d9a719520d7ee6494c436b9328f6ff649467286c4a241412c646ce5c9e83858fc565f5f69fdc3264f0a8bb478
7
+ data.tar.gz: 310739ae63a5583838503902c78e51030eb2ed1ccf175715f0270d5a5946cd4c94f48f62de3f8fbef758a6d9da4298b23fee4f8e553359f7e2aba91be4f0f7ad
@@ -100,13 +100,16 @@ end
100
100
 
101
101
  # Before each scenario
102
102
  Before do |scenario|
103
+ $logger.debug "Before hook - scenario.status: #{scenario.status}"
103
104
  next if scenario.status == :skipped
104
105
 
105
106
  Maze.scenario = Maze::Api::Cucumber::Scenario.new(scenario)
106
107
 
107
108
  # Skip scenario if the driver it needs has failed
109
+ $logger.debug "Before hook - Maze.driver&.failed?: #{Maze.driver&.failed?}"
108
110
  if (Maze.mode == :appium || Maze.mode == :browser) && Maze.driver.failed?
109
- skip_this_scenario
111
+ $logger.debug "Failing scenario because the #{Maze.mode.to_s} driver failed: #{Maze.driver.failure_reason}"
112
+ scenario.fail('Cannot run scenario - driver failed')
110
113
  end
111
114
 
112
115
  # Default to no dynamic retry
@@ -134,6 +137,7 @@ end
134
137
 
135
138
  # General processing to be run after each scenario
136
139
  After do |scenario|
140
+ $logger.debug "After hook 1 - scenario.status: #{scenario.status}"
137
141
  next if scenario.status == :skipped
138
142
 
139
143
  # If we're running on macos, take a screenshot if the scenario fails
@@ -227,6 +231,7 @@ end
227
231
  #
228
232
  # Furthermore, this hook should appear after the general hook as they are executed in reverse order by Cucumber.
229
233
  After do |scenario|
234
+ $logger.debug "After hook 2 - scenario.status: #{scenario.status}"
230
235
  next if scenario.status == :skipped
231
236
 
232
237
  # Call any pre_complete hooks registered by the client
@@ -238,8 +243,10 @@ After do |scenario|
238
243
  Maze.scenario.mark_as_failed msg
239
244
  end
240
245
 
241
- # Fail the scenario if the Appium driver failed
242
- if Maze.mode == :appium && Maze.driver.failed?
246
+ # Fail the scenario if the driver failed, if the scenario hasn't already failed
247
+ $logger.debug "After hook 2 - Maze.driver&.failed?: #{Maze.driver&.failed?}"
248
+ if (Maze.mode == :appium || Maze.mode == :browser) && Maze.driver.failed? && !scenario.failed?
249
+ $logger.debug "Marking scenario as failed because driver failed: #{Maze.driver.failure_reason}"
243
250
  Maze.scenario.mark_as_failed Maze.driver.failure_reason
244
251
  end
245
252
 
@@ -249,6 +256,7 @@ end
249
256
  # Test all requests against schemas or extra validation rules. These will only run if the schema/validation is
250
257
  # specified for the specific endpoint
251
258
  After do |scenario|
259
+ $logger.debug "After hook 3 - scenario.status: #{scenario.status}"
252
260
  next if scenario.status == :skipped
253
261
 
254
262
  ['error', 'session', 'build', 'trace'].each do |endpoint|
@@ -24,6 +24,8 @@ module Maze
24
24
  end
25
25
 
26
26
  def after(scenario)
27
+ $logger.debug "Appium after hook"
28
+
27
29
  manager = Maze::Api::Appium::AppManager.new
28
30
  if Maze.config.os == 'macos'
29
31
  # Close the app - without the sleep launching the app for the next scenario intermittently fails
@@ -37,7 +39,7 @@ module Maze
37
39
  $logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
38
40
  manager.close
39
41
  else
40
- $logger.warn 'terminate_app failed, future errors may occur if the application did not close remotely'
42
+ $logger.warn 'terminate_app failed, future errors may occur if the application did not close properly'
41
43
  end
42
44
  end
43
45
 
data/lib/maze.rb CHANGED
@@ -8,7 +8,7 @@ require_relative 'maze/timers'
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
10
 
11
- VERSION = '9.27.3'
11
+ VERSION = '9.27.4'
12
12
 
13
13
  class << self
14
14
  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.27.3
4
+ version: 9.27.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-10 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber