Skip to content

Commit

Permalink
Merge pull request #706 from bugsnag/tiered-notifies
Browse files Browse the repository at this point in the history
Use normal maze-runner API key in the event of selenium failures
  • Loading branch information
joshedney authored Nov 28, 2024
2 parents e3681c8 + 822ec22 commit a517018
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 9.20.1- 2024/11/27
# 9.21.0 - 2024/11/28

## Enhancements

- Ensure selenium related errors are always reported [706](https://github.com/bugsnag/maze-runner/pull/706)

## Fixes

Expand Down
3 changes: 2 additions & 1 deletion lib/maze.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Glues the various parts of MazeRunner together that need to be accessed globally,
# providing an alternative to the proliferation of global variables or singletons.
module Maze
VERSION = '9.20.1'

VERSION = '9.21.0'

class << self
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
Expand Down
7 changes: 5 additions & 2 deletions lib/maze/plugins/bugsnag_reporting_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def test_case(test_case)
next unless event.test_case.eql?(test_case) && event.result.failed?

Bugsnag.notify(event.result.exception) do |bsg_event|

bsg_event.api_key = ENV['MAZE_SCENARIO_BUGSNAG_API_KEY']
bsg_event.api_key = ENV['MAZE_SCENARIO_BUGSNAG_API_KEY'] unless selenium_report?(event.result.exception)

unless @last_test_step.nil?

Expand Down Expand Up @@ -54,6 +53,10 @@ def test_case(test_case)

super
end

def selenium_report?(exception)
exception.class.to_s.include?('Selenium')
end
end
end
end

0 comments on commit a517018

Please sign in to comment.