-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathnative-stack.feature
More file actions
197 lines (180 loc) · 10.4 KB
/
native-stack.feature
File metadata and controls
197 lines (180 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Feature: Native stacktrace is parsed for promise rejections
# Skipped on New Arch below 0.74 - see PLAT-12193
@android_only @skip_new_arch_below_074
Scenario: Handled native promise rejection with native stacktrace
When I run "NativePromiseRejectionHandledScenario"
Then I wait to receive an error
And the event "unhandled" is false
And the error payload field "events.0.exceptions" is an array with 1 elements
# On 0.75+ the Error name is set to the native exception class
And the event "exceptions.0.errorClass" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | Error |
| new | 0.74 | Error |
| new | default | java.lang.RuntimeException |
| old | 0.68 | Error |
| old | 0.69 | Error |
| old | 0.72 | Error |
| old | 0.74 | Error |
| old | default | java.lang.RuntimeException |
And the event "exceptions.0.message" equals "NativePromiseRejectionHandledScenario"
And the event "exceptions.0.type" equals "reactnativejs"
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
# the native part of the stack comes first
And the error payload field "events.0.exceptions.0.stacktrace.0.type" equals "android"
And the error payload field "events.0.exceptions.0.stacktrace.0.file" equals one of:
| Scenario.kt |
| SourceFile |
And the error payload field "events.0.exceptions.0.stacktrace.0.method" equals one of:
| com.reactnative.scenarios.Scenario.generateException |
| generateException |
And the error payload field "events.0.exceptions.0.stacktrace.1.method" equals one of:
| com.reactnative.scenarios.NativePromiseRejectionHandledScenario.run |
| run |
And the error payload field "events.0.exceptions.0.stacktrace.2.method" equals one of:
| com.reactnative.module.BugsnagModule.runScenario |
| com.reactnative.scenarios.BugsnagTestInterfaceImpl.runScenario |
| runScenario |
# the javascript part follows
# On 0.74+ New Arch there is no JS stacktrace - see PLAT-12193
And the stacktrace contains "file" equal to the version-dependent string:
| arch | version | value |
| new | default | @skip |
| old | default | index.android.bundle |
# Skipped on New Arch below 0.74 - see PLAT-12193
@android_only @skip_new_arch_below_074
Scenario: Unhandled native promise rejection with native stacktrace
When I run "NativePromiseRejectionUnhandledScenario"
Then I wait to receive an error
And the event "unhandled" is true
# On 0.75+ the Error name is set to the native exception class
And the event "exceptions.0.errorClass" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | Error |
| new | 0.74 | Error |
| new | default | java.lang.RuntimeException |
| old | 0.68 | Error |
| old | 0.69 | Error |
| old | 0.72 | Error |
| old | 0.74 | Error |
| old | default | java.lang.RuntimeException |
And the event "exceptions.0.message" equals "NativePromiseRejectionUnhandledScenario"
And the event "exceptions.0.type" equals "reactnativejs"
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
# the native part of the stack comes first
And the error payload field "events.0.exceptions.0.stacktrace.0.type" equals "android"
And the error payload field "events.0.exceptions.0.stacktrace.0.file" equals one of:
| Scenario.kt |
| SourceFile |
And the error payload field "events.0.exceptions.0.stacktrace.1.file" equals one of:
| NativePromiseRejectionUnhandledScenario.kt |
| SourceFile |
And the error payload field "events.0.exceptions.0.stacktrace.2.file" equals one of:
| BugsnagModule.java |
| BugsnagTestInterfaceImpl.java |
| SourceFile |
And the error payload field "events.0.exceptions.0.stacktrace.0.method" equals one of:
| com.reactnative.scenarios.Scenario.generateException |
| generateException |
And the error payload field "events.0.exceptions.0.stacktrace.1.method" equals one of:
| com.reactnative.scenarios.NativePromiseRejectionUnhandledScenario.run |
| run |
And the error payload field "events.0.exceptions.0.stacktrace.2.method" equals one of:
| com.reactnative.module.BugsnagModule.runScenario |
| com.reactnative.scenarios.BugsnagTestInterfaceImpl.runScenario |
| runScenario |
# the javascript part follows
# On 0.74+ New Arch there is no JS stacktrace - see PLAT-12193
And the stacktrace contains "file" equal to the version-dependent string:
| arch | version | value |
| new | default | @skip |
| old | default | index.android.bundle |
# # PLAT-5117 addresses float serialization
# And the error payload field "events.0.exceptions.1.stacktrace.0.lineNumber" equals 1
# And the error payload field "events.0.exceptions.1.stacktrace.1.lineNumber" equals 1
# And the error payload field "events.0.exceptions.1.stacktrace.2.lineNumber" equals 2
# Skipped on New Arch below 0.74 - see PLAT-12193
@ios_only @skip_new_arch_below_074
Scenario: Handled native promise rejection with native stacktrace
When I run "NativePromiseRejectionHandledScenario"
Then I wait to receive an error
And the event "unhandled" is false
And the error payload field "events.0.exceptions" is an array with 1 elements
And the event "exceptions.0.errorClass" equals "Error"
And the event "exceptions.0.message" equals "NativePromiseRejectionHandledScenario"
And the event "exceptions.0.type" equals "reactnativejs"
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
# the native part of the stack comes first
And the error payload field "events.0.exceptions.0.stacktrace.0.frameAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoFile" equals "reactnative"
And the error payload field "events.0.exceptions.0.stacktrace.0.machoLoadAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoUUID" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoVMAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.method" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.symbolAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.type" equals "cocoa"
# the javascript part follows
# On 0.74+ New Arch there is no JS stacktrace - see PLAT-12193
# We're check the method: asyncGeneratorStep
And the event "exceptions.0.stacktrace.21.columnNumber" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.file" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.lineNumber" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.type" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @null |
| new | default | @skip |
| old | default | @null |
# Skipped on New Arch below 0.74 - see PLAT-12193
@ios_only @skip_new_arch_below_074
Scenario: Unhandled native promise rejection with native stacktrace
When I run "NativePromiseRejectionUnhandledScenario"
Then I wait to receive an error
And the event "unhandled" is true
And the event "exceptions.0.errorClass" equals "Error"
And the event "exceptions.0.message" equals "NativePromiseRejectionUnhandledScenario"
And the event "exceptions.0.type" equals "reactnativejs"
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
# the native part of the stack comes first
And the error payload field "events.0.exceptions.0.stacktrace.0.frameAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoFile" equals "reactnative"
And the error payload field "events.0.exceptions.0.stacktrace.0.machoLoadAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoUUID" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.machoVMAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.method" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.symbolAddress" is not null
And the error payload field "events.0.exceptions.0.stacktrace.0.type" equals "cocoa"
# the javascript part follows
# On 0.74+ New Arch there is no JS stacktrace - see PLAT-12193
# We're check the method: asyncGeneratorStep
And the event "exceptions.0.stacktrace.21.columnNumber" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.file" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.lineNumber" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @not_null |
| new | default | @skip |
| old | default | @not_null |
And the event "exceptions.0.stacktrace.21.type" equals the version-dependent string:
| arch | version | value |
| new | 0.72 | @null |
| new | default | @skip |
| old | default | @null |