|
| 1 | +Feature: ErrorCaptureOptions |
| 2 | + |
| 3 | + Background: |
| 4 | + Given I clear all persistent data |
| 5 | + |
| 6 | + Scenario: Capture only stacktrace |
| 7 | + When I configure the app to run in the "stacktrace" state |
| 8 | + And I run "ErrorOptionsScenario" |
| 9 | + Then I wait to receive an error |
| 10 | + And the error is valid for the error reporting API version "4.0" for the "Android Bugsnag Notifier" notifier |
| 11 | + # Stacktrace validation |
| 12 | + And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array |
| 13 | + And the event "exceptions.0.stacktrace.0.method" ends with "ErrorOptionsScenario.startScenario" |
| 14 | + And the exception "stacktrace.0.file" equals "SourceFile" |
| 15 | + |
| 16 | + And the event "user.id" is null |
| 17 | + And the event "user.name" is null |
| 18 | + And the error payload field "events.0.breadcrumbs" is an array with 0 elements |
| 19 | + And the error payload field "events.0.featureFlags" is an array with 0 elements |
| 20 | + And the error payload field "events.0.threads" is an array with 0 elements |
| 21 | + |
| 22 | + Scenario: Capture only user |
| 23 | + When I configure the app to run in the "user" state |
| 24 | + And I run "ErrorOptionsScenario" |
| 25 | + Then I wait to receive an error |
| 26 | + And the error is valid for the error reporting API version "4.0" for the "Android Bugsnag Notifier" notifier |
| 27 | + |
| 28 | + And the event "user.id" equals "123" |
| 29 | + And the event "user.email" equals "jane@doe.com" |
| 30 | + And the event "user.name" equals "Jane Doe" |
| 31 | + |
| 32 | + And the error payload field "events.0.breadcrumbs" is an array with 0 elements |
| 33 | + And the error payload field "events.0.featureFlags" is an array with 0 elements |
| 34 | + And the error payload field "events.0.threads" is an array with 0 elements |
| 35 | + |
| 36 | + Scenario: Capture only breadcrumbs |
| 37 | + When I configure the app to run in the "breadcrumbs" state |
| 38 | + And I run "ErrorOptionsScenario" |
| 39 | + Then I wait to receive an error |
| 40 | + And the error is valid for the error reporting API version "4.0" for the "Android Bugsnag Notifier" notifier |
| 41 | + |
| 42 | + And the event "user.id" equals "123" |
| 43 | + And the event "user.email" equals "jane@doe.com" |
| 44 | + And the event "user.name" equals "Jane Doe" |
| 45 | + |
| 46 | + And the error payload field "events.0.breadcrumbs" is an array with 0 elements |
| 47 | + And the error payload field "events.0.featureFlags" is an array with 0 elements |
| 48 | + And the error payload field "events.0.threads" is an array with 0 elements |
| 49 | + |
| 50 | + Scenario: Capture only feature flags |
| 51 | + When I configure the app to run in the "user" state |
| 52 | + And I run "ErrorOptionsScenario" |
| 53 | + Then I wait to receive an error |
| 54 | + And the error is valid for the error reporting API version "4.0" for the "Android Bugsnag Notifier" notifier |
| 55 | + And the event "user.id" is null |
| 56 | + And the event "user.name" is null |
| 57 | + And the error payload field "events.0.breadcrumbs" is an array with 0 elements |
| 58 | + And the error payload field "events.0.threads" is an array with 0 elements |
| 59 | + |
| 60 | + And the error payload field "events.0.featureFlags" is an array with 2 elements |
| 61 | + And event 0 contains the feature flag "testFeatureFlag" with variant "variantA" |
| 62 | + And event 0 contains the feature flag "featureFlag2" with no variant |
| 63 | + |
| 64 | + Scenario: Capture selected metadata and stacktrace |
| 65 | + When I configure the app to run in the "custom2" state |
| 66 | + And I run "ErrorOptionsScenario" |
| 67 | + Then I wait to receive an error |
| 68 | + And the error is valid for the error reporting API version "4.0" for the "Android Bugsnag Notifier" notifier |
| 69 | + # Stacktrace validation |
| 70 | + And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array |
| 71 | + And the event "exceptions.0.stacktrace.0.method" ends with "ErrorOptionsScenario.startScenario" |
| 72 | + And the exception "stacktrace.0.file" equals "SourceFile" |
| 73 | + |
| 74 | + And the event "user.id" is null |
| 75 | + And the event "user.name" is null |
| 76 | + And the error payload field "events.0.breadcrumbs" is an array with 0 elements |
| 77 | + And the error payload field "events.0.featureFlags" is an array with 0 elements |
| 78 | + And the event "metaData.custom2.testKey2" equals "value" |
0 commit comments