bugsnag 6.12.1 → 6.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.buildkite/pipeline.yml +470 -0
- data/.rubocop.yml +55 -0
- data/.rubocop_todo.yml +530 -160
- data/CHANGELOG.md +73 -0
- data/CONTRIBUTING.md +1 -9
- data/Gemfile +14 -7
- data/TESTING.md +81 -0
- data/VERSION +1 -1
- data/docker-compose.yml +46 -0
- data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
- data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
- data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
- data/features/delayed_job.feature +6 -22
- data/features/fixtures/delayed_job/Dockerfile +2 -4
- data/features/fixtures/delayed_job/app/Gemfile +1 -1
- data/features/fixtures/delayed_job/app/Rakefile +18 -0
- data/features/fixtures/docker-compose.yml +32 -40
- data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
- data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
- data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
- data/features/fixtures/expected_breadcrumbs/request.json +13 -0
- data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
- data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
- data/features/fixtures/plain/Dockerfile +2 -2
- data/features/fixtures/plain/app/app.rb +1 -3
- data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
- data/features/fixtures/plain/app/report_modification/initiators/handled_on_error.rb +10 -0
- data/features/fixtures/plain/app/report_modification/initiators/unhandled_on_error.rb +11 -0
- data/features/fixtures/plain/app/stack_frame_modification/initiators/handled_on_error.rb +29 -0
- data/features/fixtures/plain/app/stack_frame_modification/initiators/unhandled_on_error.rb +26 -0
- data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
- data/features/fixtures/rack1/Dockerfile +2 -2
- data/features/fixtures/rack2/Dockerfile +2 -2
- data/features/fixtures/rails3/Dockerfile +2 -2
- data/features/fixtures/rails3/app/Gemfile +4 -0
- data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +11 -2
- data/features/fixtures/rails4/Dockerfile +2 -5
- data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails5/Dockerfile +2 -2
- data/features/fixtures/rails5/app/Gemfile +3 -2
- data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails6/Dockerfile +2 -2
- data/features/fixtures/rails6/app/Gemfile +3 -2
- data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
- data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
- data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
- data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
- data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
- data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
- data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +10 -1
- data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
- data/features/fixtures/rails6/app/config/routes.rb +4 -0
- data/features/fixtures/resque/Dockerfile +2 -2
- data/features/fixtures/sidekiq/Dockerfile +5 -7
- data/features/fixtures/sidekiq/app/Gemfile +2 -1
- data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
- data/features/fixtures/sinatra1/Dockerfile +2 -2
- data/features/fixtures/sinatra2/Dockerfile +2 -2
- data/features/plain_features/add_tab.feature +30 -97
- data/features/plain_features/app_type.feature +6 -25
- data/features/plain_features/app_version.feature +6 -25
- data/features/plain_features/auto_notify.feature +4 -20
- data/features/plain_features/delivery.feature +12 -60
- data/features/plain_features/exception_data.feature +24 -94
- data/features/plain_features/filters.feature +9 -43
- data/features/plain_features/handled_errors.feature +16 -78
- data/features/plain_features/ignore_classes.feature +5 -23
- data/features/plain_features/ignore_report.feature +8 -24
- data/features/plain_features/proxies.feature +13 -56
- data/features/plain_features/release_stages.feature +9 -40
- data/features/plain_features/report_api_key.feature +11 -35
- data/features/plain_features/report_severity.feature +10 -35
- data/features/plain_features/report_stack_frames.feature +29 -93
- data/features/plain_features/report_user.feature +29 -96
- data/features/plain_features/unhandled_errors.feature +17 -88
- data/features/rails_features/api_key.feature +12 -58
- data/features/rails_features/app_type.feature +13 -58
- data/features/rails_features/app_version.feature +19 -80
- data/features/rails_features/auto_capture_sessions.feature +31 -112
- data/features/rails_features/auto_notify.feature +28 -105
- data/features/rails_features/before_notify.feature +18 -83
- data/features/rails_features/breadcrumbs.feature +40 -137
- data/features/rails_features/handled.feature +18 -82
- data/features/rails_features/ignore_classes.feature +12 -51
- data/features/rails_features/meta_data_filters.feature +9 -33
- data/features/rails_features/mongo_breadcrumbs.feature +22 -96
- data/features/rails_features/on_error.feature +29 -0
- data/features/rails_features/project_root.feature +19 -84
- data/features/rails_features/release_stage.feature +20 -82
- data/features/rails_features/send_code.feature +13 -55
- data/features/rails_features/send_environment.feature +7 -33
- data/features/rails_features/unhandled.feature +6 -31
- data/features/rails_features/user_info.feature +27 -65
- data/features/sidekiq.feature +12 -79
- data/features/steps/ruby_notifier_steps.rb +59 -15
- data/features/support/env.rb +12 -45
- data/lib/bugsnag.rb +109 -21
- data/lib/bugsnag/breadcrumbs/breadcrumbs.rb +0 -2
- data/lib/bugsnag/breadcrumbs/validator.rb +0 -6
- data/lib/bugsnag/cleaner.rb +129 -60
- data/lib/bugsnag/code_extractor.rb +137 -0
- data/lib/bugsnag/configuration.rb +58 -1
- data/lib/bugsnag/helpers.rb +2 -4
- data/lib/bugsnag/integrations/que.rb +7 -4
- data/lib/bugsnag/middleware/discard_error_class.rb +30 -0
- data/lib/bugsnag/middleware/exception_meta_data.rb +15 -9
- data/lib/bugsnag/middleware/ignore_error_class.rb +2 -0
- data/lib/bugsnag/middleware/rack_request.rb +2 -4
- data/lib/bugsnag/middleware_stack.rb +38 -3
- data/lib/bugsnag/on_error_callbacks.rb +33 -0
- data/lib/bugsnag/report.rb +4 -14
- data/lib/bugsnag/session_tracker.rb +3 -3
- data/lib/bugsnag/stacktrace.rb +28 -75
- data/spec/breadcrumbs/breadcrumb_spec.rb +1 -1
- data/spec/breadcrumbs/validator_spec.rb +1 -26
- data/spec/bugsnag_spec.rb +2 -2
- data/spec/cleaner_spec.rb +202 -10
- data/spec/code_extractor_spec.rb +129 -0
- data/spec/configuration_spec.rb +16 -1
- data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
- data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
- data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
- data/spec/fixtures/crashes/file1.rb +29 -0
- data/spec/fixtures/crashes/file2.rb +25 -0
- data/spec/fixtures/crashes/file_with_long_lines.rb +7 -0
- data/spec/fixtures/crashes/functions.rb +29 -0
- data/spec/fixtures/crashes/short_file.rb +2 -0
- data/spec/helper_spec.rb +0 -31
- data/spec/integrations/logger_spec.rb +1 -1
- data/spec/integrations/rack_spec.rb +8 -6
- data/spec/integrations/rake_spec.rb +1 -1
- data/spec/on_error_spec.rb +332 -0
- data/spec/report_spec.rb +331 -30
- data/spec/spec_helper.rb +14 -1
- data/spec/stacktrace_spec.rb +427 -74
- metadata +36 -7
- data/.travis.yml +0 -117
- data/features/plain_features/api_key.feature +0 -25
@@ -1,18 +1,9 @@
|
|
1
1
|
Feature: Plain unhandled errors
|
2
2
|
|
3
|
-
Background:
|
4
|
-
Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
5
|
-
And I configure the bugsnag endpoint
|
6
|
-
|
7
3
|
Scenario Outline: An unhandled error sends a report
|
8
|
-
|
9
|
-
And I
|
10
|
-
|
11
|
-
And I wait for 1 second
|
12
|
-
Then I should receive a request
|
13
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
14
|
-
And the request used payload v4 headers
|
15
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
4
|
+
Given I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
|
5
|
+
And I wait to receive a request
|
6
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
16
7
|
And the event "unhandled" is true
|
17
8
|
And the event "severity" equals "error"
|
18
9
|
And the event "severityReason.type" equals "unhandledException"
|
@@ -21,84 +12,22 @@ Scenario Outline: An unhandled error sends a report
|
|
21
12
|
And the "lineNumber" of stack frame 0 equals <lineNumber>
|
22
13
|
|
23
14
|
Examples:
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| 2.0 | runtime_error | RuntimeError | 6 |
|
34
|
-
| 2.0 | load_error | LoadError | 6 |
|
35
|
-
| 2.0 | syntax_error | SyntaxError | 6 |
|
36
|
-
| 2.0 | local_jump_error | LocalJumpError | 7 |
|
37
|
-
| 2.0 | name_error | NameError | 6 |
|
38
|
-
| 2.0 | no_method_error | NoMethodError | 6 |
|
39
|
-
| 2.0 | system_call_error | Errno::ENOENT | 6 |
|
40
|
-
| 2.0 | custom_error | CustomError | 9 |
|
41
|
-
| 2.1 | runtime_error | RuntimeError | 6 |
|
42
|
-
| 2.1 | load_error | LoadError | 6 |
|
43
|
-
| 2.1 | syntax_error | SyntaxError | 6 |
|
44
|
-
| 2.1 | local_jump_error | LocalJumpError | 7 |
|
45
|
-
| 2.1 | name_error | NameError | 6 |
|
46
|
-
| 2.1 | no_method_error | NoMethodError | 6 |
|
47
|
-
| 2.1 | system_call_error | Errno::ENOENT | 6 |
|
48
|
-
| 2.1 | custom_error | CustomError | 9 |
|
49
|
-
| 2.2 | runtime_error | RuntimeError | 6 |
|
50
|
-
| 2.2 | load_error | LoadError | 6 |
|
51
|
-
| 2.2 | syntax_error | SyntaxError | 6 |
|
52
|
-
| 2.2 | local_jump_error | LocalJumpError | 7 |
|
53
|
-
| 2.2 | name_error | NameError | 6 |
|
54
|
-
| 2.2 | no_method_error | NoMethodError | 6 |
|
55
|
-
| 2.2 | system_call_error | Errno::ENOENT | 6 |
|
56
|
-
| 2.2 | custom_error | CustomError | 9 |
|
57
|
-
| 2.3 | runtime_error | RuntimeError | 6 |
|
58
|
-
| 2.3 | load_error | LoadError | 6 |
|
59
|
-
| 2.3 | syntax_error | SyntaxError | 6 |
|
60
|
-
| 2.3 | local_jump_error | LocalJumpError | 7 |
|
61
|
-
| 2.3 | name_error | NameError | 6 |
|
62
|
-
| 2.3 | no_method_error | NoMethodError | 6 |
|
63
|
-
| 2.3 | system_call_error | Errno::ENOENT | 6 |
|
64
|
-
| 2.3 | custom_error | CustomError | 9 |
|
65
|
-
| 2.4 | runtime_error | RuntimeError | 6 |
|
66
|
-
| 2.4 | load_error | LoadError | 6 |
|
67
|
-
| 2.4 | syntax_error | SyntaxError | 6 |
|
68
|
-
| 2.4 | local_jump_error | LocalJumpError | 7 |
|
69
|
-
| 2.4 | name_error | NameError | 6 |
|
70
|
-
| 2.4 | no_method_error | NoMethodError | 6 |
|
71
|
-
| 2.4 | system_call_error | Errno::ENOENT | 6 |
|
72
|
-
| 2.4 | custom_error | CustomError | 9 |
|
73
|
-
| 2.5 | runtime_error | RuntimeError | 6 |
|
74
|
-
| 2.5 | load_error | LoadError | 6 |
|
75
|
-
| 2.5 | syntax_error | SyntaxError | 6 |
|
76
|
-
| 2.5 | local_jump_error | LocalJumpError | 7 |
|
77
|
-
| 2.5 | name_error | NameError | 6 |
|
78
|
-
| 2.5 | no_method_error | NoMethodError | 6 |
|
79
|
-
| 2.5 | system_call_error | Errno::ENOENT | 6 |
|
80
|
-
| 2.5 | custom_error | CustomError | 9 |
|
15
|
+
| file | error | lineNumber |
|
16
|
+
| runtime_error | RuntimeError | 6 |
|
17
|
+
| load_error | LoadError | 6 |
|
18
|
+
| syntax_error | SyntaxError | 6 |
|
19
|
+
| local_jump_error | LocalJumpError | 7 |
|
20
|
+
| name_error | NameError | 6 |
|
21
|
+
| no_method_error | NoMethodError | 6 |
|
22
|
+
| system_call_error | Errno::ENOENT | 6 |
|
23
|
+
| custom_error | CustomError | 9 |
|
81
24
|
|
82
25
|
Scenario Outline: An unhandled error doesn't send a report
|
83
|
-
|
84
|
-
And I have built the service "plain-ruby"
|
85
|
-
And I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
|
26
|
+
When I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
|
86
27
|
And I wait for 1 second
|
87
|
-
Then I should receive
|
28
|
+
Then I should receive no requests
|
88
29
|
|
89
30
|
Examples:
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| 2.0 | interrupt |
|
94
|
-
| 2.0 | system_exit |
|
95
|
-
| 2.1 | interrupt |
|
96
|
-
| 2.1 | system_exit |
|
97
|
-
| 2.2 | interrupt |
|
98
|
-
| 2.2 | system_exit |
|
99
|
-
| 2.3 | interrupt |
|
100
|
-
| 2.3 | system_exit |
|
101
|
-
| 2.4 | interrupt |
|
102
|
-
| 2.4 | system_exit |
|
103
|
-
| 2.5 | interrupt |
|
104
|
-
| 2.5 | system_exit |
|
31
|
+
| file |
|
32
|
+
| interrupt |
|
33
|
+
| system_exit |
|
@@ -1,61 +1,15 @@
|
|
1
1
|
Feature: API key
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
And I start the service "rails<rails_version>"
|
12
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
13
|
-
When I navigate to the route "/api_key/environment" on port "6128<rails_version>"
|
14
|
-
Then I should receive a request
|
15
|
-
And the request is a valid for the error reporting API
|
16
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
17
|
-
And the request contained the api key "b35a2a72bd230ac0aa0f52715bbdc6ab"
|
18
|
-
And the payload field "events" is an array with 1 element
|
19
|
-
|
20
|
-
Examples:
|
21
|
-
| ruby_version | rails_version |
|
22
|
-
| 2.0 | 3 |
|
23
|
-
| 2.1 | 3 |
|
24
|
-
| 2.2 | 3 |
|
25
|
-
| 2.2 | 4 |
|
26
|
-
| 2.2 | 5 |
|
27
|
-
| 2.3 | 3 |
|
28
|
-
| 2.3 | 4 |
|
29
|
-
| 2.3 | 5 |
|
30
|
-
| 2.4 | 3 |
|
31
|
-
| 2.4 | 5 |
|
32
|
-
| 2.5 | 3 |
|
33
|
-
| 2.5 | 5 |
|
34
|
-
| 2.5 | 6 |
|
35
|
-
|
3
|
+
@rails3 @rails4 @rails5 @rails6
|
4
|
+
Scenario: Setting api_key in environment variable works
|
5
|
+
Given I start the rails service
|
6
|
+
When I navigate to the route "/api_key/environment" on the rails app
|
7
|
+
And I wait to receive a request
|
8
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
9
|
+
|
10
|
+
@rails3 @rails4 @rails5 @rails6
|
36
11
|
Scenario Outline: Changing api_key after initializer works
|
37
|
-
Given I
|
38
|
-
|
39
|
-
And I wait
|
40
|
-
|
41
|
-
Then I should receive a request
|
42
|
-
And the request is a valid for the error reporting API
|
43
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
44
|
-
And the request contained the api key "c35a2a72bd230ac0aa0f52715bbdc6ac"
|
45
|
-
And the payload field "events" is an array with 1 element
|
46
|
-
|
47
|
-
Examples:
|
48
|
-
| ruby_version | rails_version |
|
49
|
-
| 2.0 | 3 |
|
50
|
-
| 2.1 | 3 |
|
51
|
-
| 2.2 | 3 |
|
52
|
-
| 2.2 | 4 |
|
53
|
-
| 2.2 | 5 |
|
54
|
-
| 2.3 | 3 |
|
55
|
-
| 2.3 | 4 |
|
56
|
-
| 2.3 | 5 |
|
57
|
-
| 2.4 | 3 |
|
58
|
-
| 2.4 | 5 |
|
59
|
-
| 2.5 | 3 |
|
60
|
-
| 2.5 | 5 |
|
61
|
-
| 2.5 | 6 |
|
12
|
+
Given I start the rails service
|
13
|
+
When I navigate to the route "/api_key/changing?api_key=c35a2a72bd230ac0aa0f52715bbdc6ac" on the rails app
|
14
|
+
And I wait to receive a request
|
15
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
@@ -1,69 +1,24 @@
|
|
1
1
|
Feature: App type configuration
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
And I
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
And I set environment variable "BUGSNAG_APP_TYPE" to "custom_app_type"
|
11
|
-
And I start the service "rails<rails_version>"
|
12
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
13
|
-
When I navigate to the route "/app_type/initializer" on port "6128<rails_version>"
|
14
|
-
Then I should receive a request
|
15
|
-
And the request is a valid for the error reporting API
|
16
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
17
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
18
|
-
And the payload field "events" is an array with 1 element
|
3
|
+
@rails3 @rails4 @rails5 @rails6
|
4
|
+
Scenario: Setting app_type in initializer works
|
5
|
+
Given I set environment variable "BUGSNAG_APP_TYPE" to "custom_app_type"
|
6
|
+
And I start the rails service
|
7
|
+
When I navigate to the route "/app_type/initializer" on the rails app
|
8
|
+
And I wait to receive a request
|
9
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
19
10
|
And the exception "errorClass" equals "RuntimeError"
|
20
11
|
And the exception "message" starts with "handled string"
|
21
12
|
And the event "metaData.request.url" ends with "/app_type/initializer"
|
22
13
|
And the event "app.type" equals "custom_app_type"
|
23
14
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
| 2.2 | 5 |
|
31
|
-
| 2.3 | 3 |
|
32
|
-
| 2.3 | 4 |
|
33
|
-
| 2.3 | 5 |
|
34
|
-
| 2.4 | 3 |
|
35
|
-
| 2.4 | 5 |
|
36
|
-
| 2.5 | 3 |
|
37
|
-
| 2.5 | 5 |
|
38
|
-
| 2.5 | 6 |
|
39
|
-
|
40
|
-
Scenario Outline: Changing app_type after initializer works
|
41
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
42
|
-
And I start the service "rails<rails_version>"
|
43
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
44
|
-
When I navigate to the route "/app_type/after?type=maze_after_initializer" on port "6128<rails_version>"
|
45
|
-
Then I should receive a request
|
46
|
-
And the request is a valid for the error reporting API
|
47
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
48
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
49
|
-
And the payload field "events" is an array with 1 element
|
15
|
+
@rails3 @rails4 @rails5 @rails6
|
16
|
+
Scenario: Changing app_type after initializer works
|
17
|
+
Given I start the rails service
|
18
|
+
When I navigate to the route "/app_type/after?type=maze_after_initializer" on the rails app
|
19
|
+
And I wait to receive a request
|
20
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
50
21
|
And the exception "errorClass" equals "RuntimeError"
|
51
22
|
And the exception "message" starts with "handled string"
|
52
23
|
And the event "metaData.request.url" ends with "/app_type/after?type=maze_after_initializer"
|
53
24
|
And the event "app.type" equals "maze_after_initializer"
|
54
|
-
|
55
|
-
Examples:
|
56
|
-
| ruby_version | rails_version |
|
57
|
-
| 2.0 | 3 |
|
58
|
-
| 2.1 | 3 |
|
59
|
-
| 2.2 | 3 |
|
60
|
-
| 2.2 | 4 |
|
61
|
-
| 2.2 | 5 |
|
62
|
-
| 2.3 | 3 |
|
63
|
-
| 2.3 | 4 |
|
64
|
-
| 2.3 | 5 |
|
65
|
-
| 2.4 | 3 |
|
66
|
-
| 2.4 | 5 |
|
67
|
-
| 2.5 | 3 |
|
68
|
-
| 2.5 | 5 |
|
69
|
-
| 2.5 | 6 |
|
@@ -1,87 +1,26 @@
|
|
1
1
|
Feature: App version configuration
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
10
|
-
And I start the service "rails<rails_version>"
|
11
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
12
|
-
When I navigate to the route "/app_version/default" on port "6128<rails_version>"
|
13
|
-
Then I should receive a request
|
14
|
-
And the request is a valid for the error reporting API
|
15
|
-
And the payload field "events" is an array with 1 element
|
3
|
+
@rails3 @rails4 @rails5 @rails6
|
4
|
+
Scenario: App_version is nil by default
|
5
|
+
Given I start the rails service
|
6
|
+
When I navigate to the route "/app_version/default" on the rails app
|
7
|
+
And I wait to receive a request
|
8
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
16
9
|
And the event "app.version" is null
|
17
10
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
| 2.3 | 3 |
|
26
|
-
| 2.3 | 4 |
|
27
|
-
| 2.3 | 5 |
|
28
|
-
| 2.4 | 3 |
|
29
|
-
| 2.4 | 5 |
|
30
|
-
| 2.5 | 3 |
|
31
|
-
| 2.5 | 5 |
|
32
|
-
| 2.5 | 6 |
|
33
|
-
|
34
|
-
Scenario Outline: Setting app_version in initializer works
|
35
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
36
|
-
And I set environment variable "BUGSNAG_APP_VERSION" to "1.0.0"
|
37
|
-
And I start the service "rails<rails_version>"
|
38
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
39
|
-
When I navigate to the route "/app_version/initializer" on port "6128<rails_version>"
|
40
|
-
Then I should receive a request
|
41
|
-
And the request is a valid for the error reporting API
|
42
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
43
|
-
And the payload field "events" is an array with 1 element
|
11
|
+
@rails3 @rails4 @rails5 @rails6
|
12
|
+
Scenario: Setting app_version in initializer works
|
13
|
+
Given I set environment variable "BUGSNAG_APP_VERSION" to "1.0.0"
|
14
|
+
And I start the rails service
|
15
|
+
When I navigate to the route "/app_version/initializer" on the rails app
|
16
|
+
And I wait to receive a request
|
17
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
44
18
|
And the event "app.version" equals "1.0.0"
|
45
19
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
| 2.2 | 5 |
|
53
|
-
| 2.3 | 3 |
|
54
|
-
| 2.3 | 4 |
|
55
|
-
| 2.3 | 5 |
|
56
|
-
| 2.4 | 3 |
|
57
|
-
| 2.4 | 5 |
|
58
|
-
| 2.5 | 3 |
|
59
|
-
| 2.5 | 5 |
|
60
|
-
| 2.5 | 6 |
|
61
|
-
|
62
|
-
Scenario Outline: Setting app_version after initializer works
|
63
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
64
|
-
And I start the service "rails<rails_version>"
|
65
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
66
|
-
When I navigate to the route "/app_version/after?version=1.1.0" on port "6128<rails_version>"
|
67
|
-
Then I should receive a request
|
68
|
-
And the request is a valid for the error reporting API
|
69
|
-
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
70
|
-
And the payload field "events" is an array with 1 element
|
20
|
+
@rails3 @rails4 @rails5 @rails6
|
21
|
+
Scenario: Setting app_version after initializer works
|
22
|
+
Given I start the rails service
|
23
|
+
When I navigate to the route "/app_version/after?version=1.1.0" on the rails app
|
24
|
+
And I wait to receive a request
|
25
|
+
Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
|
71
26
|
And the event "app.version" equals "1.1.0"
|
72
|
-
|
73
|
-
Examples:
|
74
|
-
| ruby_version | rails_version |
|
75
|
-
| 2.0 | 3 |
|
76
|
-
| 2.1 | 3 |
|
77
|
-
| 2.2 | 3 |
|
78
|
-
| 2.2 | 4 |
|
79
|
-
| 2.2 | 5 |
|
80
|
-
| 2.3 | 3 |
|
81
|
-
| 2.3 | 4 |
|
82
|
-
| 2.3 | 5 |
|
83
|
-
| 2.4 | 3 |
|
84
|
-
| 2.4 | 5 |
|
85
|
-
| 2.5 | 3 |
|
86
|
-
| 2.5 | 5 |
|
87
|
-
| 2.5 | 6 |
|
@@ -1,115 +1,34 @@
|
|
1
1
|
Feature: Auto capture sessions
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
And I
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
And
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
| 2.5 | 6 |
|
35
|
-
|
36
|
-
Scenario Outline: Auto_capture_sessions can be set to false in the initializer
|
37
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
38
|
-
And I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
39
|
-
And I start the service "rails<rails_version>"
|
40
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
41
|
-
When I navigate to the route "/session_tracking/initializer" on port "6128<rails_version>"
|
42
|
-
Then I should receive 0 requests
|
43
|
-
|
44
|
-
Examples:
|
45
|
-
| ruby_version | rails_version |
|
46
|
-
| 2.0 | 3 |
|
47
|
-
| 2.1 | 3 |
|
48
|
-
| 2.2 | 3 |
|
49
|
-
| 2.2 | 4 |
|
50
|
-
| 2.2 | 5 |
|
51
|
-
| 2.3 | 3 |
|
52
|
-
| 2.3 | 4 |
|
53
|
-
| 2.3 | 5 |
|
54
|
-
| 2.4 | 3 |
|
55
|
-
| 2.4 | 5 |
|
56
|
-
| 2.5 | 3 |
|
57
|
-
| 2.5 | 5 |
|
58
|
-
| 2.5 | 6 |
|
59
|
-
|
60
|
-
Scenario Outline: Manual sessions are still sent if Auto_capture_sessions is false
|
61
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
62
|
-
And I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
63
|
-
And I start the service "rails<rails_version>"
|
64
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
65
|
-
When I navigate to the route "/session_tracking/manual" on port "6128<rails_version>"
|
66
|
-
Then I should receive a request
|
67
|
-
And the request is a valid for the session tracking API
|
68
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
69
|
-
And the "Bugsnag-API-Key" header equals "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
70
|
-
And the sessionCount "startedAt" is a timestamp
|
71
|
-
|
72
|
-
Examples:
|
73
|
-
| ruby_version | rails_version |
|
74
|
-
| 2.0 | 3 |
|
75
|
-
| 2.1 | 3 |
|
76
|
-
| 2.2 | 3 |
|
77
|
-
| 2.2 | 4 |
|
78
|
-
| 2.2 | 5 |
|
79
|
-
| 2.3 | 3 |
|
80
|
-
| 2.3 | 4 |
|
81
|
-
| 2.3 | 5 |
|
82
|
-
| 2.4 | 3 |
|
83
|
-
| 2.4 | 5 |
|
84
|
-
| 2.5 | 3 |
|
85
|
-
| 2.5 | 5 |
|
86
|
-
| 2.5 | 6 |
|
87
|
-
|
88
|
-
Scenario Outline: 100 session calls results in 100 sessions
|
89
|
-
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
90
|
-
And I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
91
|
-
And I start the service "rails<rails_version>"
|
92
|
-
And I wait for the app to respond on port "6128<rails_version>"
|
93
|
-
When I navigate to the route "/session_tracking/multi_sessions" on port "6128<rails_version>"
|
94
|
-
Then I should receive a request
|
95
|
-
And the request is a valid for the session tracking API
|
96
|
-
And the request used the "Ruby Bugsnag Notifier" notifier
|
97
|
-
And the "Bugsnag-API-Key" header equals "a35a2a72bd230ac0aa0f52715bbdc6aa"
|
98
|
-
And the sessionCount "startedAt" is a timestamp
|
3
|
+
@rails3 @rails4 @rails5 @rails6
|
4
|
+
Scenario: Auto_capture_sessions defaults to true
|
5
|
+
Given I set environment variable "USE_DEFAULT_AUTO_CAPTURE_SESSIONS" to "true"
|
6
|
+
And I start the rails service
|
7
|
+
When I navigate to the route "/session_tracking/initializer" on the rails app
|
8
|
+
And I wait to receive a request
|
9
|
+
Then the request is valid for the session reporting API version "1.0" for the "Ruby Bugsnag Notifier" notifier
|
10
|
+
|
11
|
+
@rails3 @rails4 @rails5 @rails6
|
12
|
+
Scenario: Auto_capture_sessions can be set to false in the initializer
|
13
|
+
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
14
|
+
And I start the rails service
|
15
|
+
When I navigate to the route "/session_tracking/initializer" on the rails app
|
16
|
+
And I wait for 3 seconds
|
17
|
+
Then I should receive no requests
|
18
|
+
|
19
|
+
@rails3 @rails4 @rails5 @rails6
|
20
|
+
Scenario: Manual sessions are still sent if Auto_capture_sessions is false
|
21
|
+
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
22
|
+
And I start the rails service
|
23
|
+
When I navigate to the route "/session_tracking/manual" on the rails app
|
24
|
+
And I wait to receive a request
|
25
|
+
Then the request is valid for the session reporting API version "1.0" for the "Ruby Bugsnag Notifier" notifier
|
26
|
+
|
27
|
+
@rails3 @rails4 @rails5 @rails6
|
28
|
+
Scenario: 100 session calls results in 100 sessions
|
29
|
+
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
|
30
|
+
And I start the rails service
|
31
|
+
When I navigate to the route "/session_tracking/multi_sessions" on the rails app
|
32
|
+
And I wait to receive a request
|
33
|
+
Then the request is valid for the session reporting API version "1.0" for the "Ruby Bugsnag Notifier" notifier
|
99
34
|
And the total sessionStarted count equals 100
|
100
|
-
|
101
|
-
Examples:
|
102
|
-
| ruby_version | rails_version |
|
103
|
-
| 2.0 | 3 |
|
104
|
-
| 2.1 | 3 |
|
105
|
-
| 2.2 | 3 |
|
106
|
-
| 2.2 | 4 |
|
107
|
-
| 2.2 | 5 |
|
108
|
-
| 2.3 | 3 |
|
109
|
-
| 2.3 | 4 |
|
110
|
-
| 2.3 | 5 |
|
111
|
-
| 2.4 | 3 |
|
112
|
-
| 2.4 | 5 |
|
113
|
-
| 2.5 | 3 |
|
114
|
-
| 2.5 | 5 |
|
115
|
-
| 2.5 | 6 |
|