Skip to content

Commit 6e3b3b7

Browse files
Merge pull request #473 from bugsnag/tms/span-step-tidy
e2e test scenario improvements
2 parents 1ccd950 + 923e205 commit 6e3b3b7

File tree

8 files changed

+15
-34
lines changed

8 files changed

+15
-34
lines changed

features/full_tests/correlation.feature

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ Feature: Manual creation of spans
22

33
Scenario: Errors notified within a span include the correlation data
44
Given I run "CorrelatedErrorScenario"
5-
And I wait to receive a trace
5+
And I wait to receive a span named "CorrelatedError Span"
66
And I wait to receive an error
77

8-
* a span name equals "CorrelatedError Span"
98
* a span field "kind" equals 1
10-
* a span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
11-
* a span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
129
* a span field "startTimeUnixNano" matches the regex "^[0-9]+$"
1310
* a span field "endTimeUnixNano" matches the regex "^[0-9]+$"
1411

features/full_tests/frame_metrics.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ Scenario: Slow & Frozen Frames are reported
88
* a span name equals "FrozenFrame"
99

1010
# The FrozenFrame span should be a child of Slow Animation
11-
* the "Slow Animation" span field "spanId" is stored as the value "slow_animation_spanId"
12-
* the "FrozenFrame" span field "parentSpanId" equals the stored value "slow_animation_spanId"
11+
* a span named "FrozenFrame" has a parent named "Slow Animation"
1312

1413
* the "Slow Animation" span integer attribute "bugsnag.rendering.slow_frames" is greater than 0
1514
* the "Slow Animation" span integer attribute "bugsnag.rendering.frozen_frames" is greater than 0

features/full_tests/instrumentation.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,5 +268,4 @@ Feature: Automatic creation of spans
268268
| bugsnag.span.category | stringValue | view_load |
269269
| bugsnag.view.type | stringValue | compose |
270270
| bugsnag.view.name | stringValue | Composable |
271-
* the "[ViewLoad/Activity]ComposeViewLoadActivity" span field "spanId" is stored as the value "activity_load_span_id"
272-
* the "[ViewLoad/Compose]Composable" span field "parentSpanId" equals the stored value "activity_load_span_id"
271+
* a span named "[ViewLoad/Compose]Composable" has a parent named "[ViewLoad/Activity]ComposeViewLoadActivity"

features/full_tests/manual_spans.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Feature: Manual creation of spans
1616

1717
* a span name equals "ManualSpanScenario"
1818
* a span field "kind" equals 1
19-
* a span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
20-
* a span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
2119
* a span field "startTimeUnixNano" matches the regex "^[0-9]+$"
2220
* a span field "endTimeUnixNano" matches the regex "^[0-9]+$"
2321
* a span string attribute "net.host.connection.type" exists

features/full_tests/nested_spans.feature

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,19 @@ Feature: Nested spans
7676
| bugsnag.span.category | stringValue | custom |
7777
| bugsnag.span.first_class | boolValue | true |
7878

79-
# Check span parentage (nested under NestedSpansActivity)
80-
* the "[ViewLoadPhase/ActivityStart]NestedSpansActivity" span field "spanId" is stored as the value "activity_start_span_id"
81-
* the "[ViewLoadPhase/ActivityResume]NestedSpansActivity" span field "spanId" is stored as the value "activity_resume_span_id"
82-
* the "[ViewLoad/Activity]NestedSpansActivity" span field "spanId" is stored as the value "view_load_span_id"
83-
* the "CustomRoot" span field "spanId" is stored as the value "custom_root_span_id"
84-
8579
# ViewLoadPhase phase spans (Create, Start, Resume) should be nested under ViewLoad
86-
* the "[ViewLoadPhase/ActivityCreate]NestedSpansActivity" span field "parentSpanId" equals the stored value "view_load_span_id"
87-
* the "[ViewLoadPhase/ActivityStart]NestedSpansActivity" span field "parentSpanId" equals the stored value "view_load_span_id"
88-
* the "[ViewLoadPhase/ActivityResume]NestedSpansActivity" span field "parentSpanId" equals the stored value "view_load_span_id"
80+
* a span named "[ViewLoadPhase/ActivityCreate]NestedSpansActivity" has a parent named "[ViewLoad/Activity]NestedSpansActivity"
81+
* a span named "[ViewLoadPhase/ActivityStart]NestedSpansActivity" has a parent named "[ViewLoad/Activity]NestedSpansActivity"
82+
* a span named "[ViewLoadPhase/ActivityResume]NestedSpansActivity" has a parent named "[ViewLoad/Activity]NestedSpansActivity"
8983

9084
# FirstFragment should be nested under ViewLoadPhase/Start
91-
* the "[ViewLoad/Fragment]FirstFragment" span field "parentSpanId" equals the stored value "activity_start_span_id"
85+
* a span named "[ViewLoad/Fragment]FirstFragment" has a parent named "[ViewLoadPhase/ActivityStart]NestedSpansActivity"
9286

9387
# CustomRoot should be nested under ViewLoadPhase/Resume
94-
* the "CustomRoot" span field "parentSpanId" equals the stored value "activity_resume_span_id"
88+
* a span named "CustomRoot" has a parent named "[ViewLoadPhase/ActivityResume]NestedSpansActivity"
9589

9690
# Remaining spans (SecondFragment, DoStuff, LoadData) should be nested under CustomRoot
97-
* the "[ViewLoad/Fragment]SecondFragment" span field "parentSpanId" equals the stored value "custom_root_span_id"
98-
* the "DoStuff" span field "parentSpanId" equals the stored value "custom_root_span_id"
99-
* the "LoadData" span field "parentSpanId" equals the stored value "custom_root_span_id"
91+
* a span named "[ViewLoad/Fragment]SecondFragment" has a parent named "CustomRoot"
92+
* a span named "DoStuff" has a parent named "CustomRoot"
93+
* a span named "LoadData" has a parent named "CustomRoot"
10094

features/full_tests/okhttp_spans.feature

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ Feature: OkHttp EventListener
22

33
Scenario: NetworkRequest spans are logged for requests
44
Given I run "OkhttpSpanScenario"
5-
And I wait to receive a trace
6-
* a span name equals "[HTTP/GET]"
7-
* a span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
8-
* a span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
5+
And I wait to receive a span named "[HTTP/GET]"
96
* a span field "kind" equals 3
107
* a span field "startTimeUnixNano" matches the regex "^[0-9]+$"
118
* a span field "endTimeUnixNano" matches the regex "^[0-9]+$"
@@ -30,8 +27,6 @@ Feature: OkHttp EventListener
3027
Then the trace "Content-Type" header equals "application/json"
3128
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
3229
* every span field "name" equals "[HTTP/GET]"
33-
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
34-
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
3530
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
3631
* every span field "endTimeUnixNano" matches the regex "^[0-9]+$"
3732
* a span string attribute "http.url" equals "https://www.google.com/"
@@ -43,8 +38,6 @@ Feature: OkHttp EventListener
4338
Then the trace "Content-Type" header equals "application/json"
4439
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
4540
* every span field "name" equals "[HTTP/GET]"
46-
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
47-
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
4841
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
4942
* every span field "endTimeUnixNano" matches the regex "^[0-9]+$"
5043
* a span string attribute "http.url" equals "https://www.google.com/"

features/full_tests/plugins.feature

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Feature: Plugins
33
Scenario: Plugins can automatically update spans
44
Given I run "PluginScenario"
55
And I wait to receive a sampling request
6-
And I wait to receive a trace
6+
And I wait to receive a span named "Span 1"
7+
And I wait to receive a span named "Span 2"
8+
And I wait to receive a span named "Span 3"
79

810
Then a span named "Span 1" contains the attributes:
911
| attribute | type | value |

features/full_tests/server_response.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ Feature: Server responses
3535
And I wait to receive 1 trace
3636
# 400 - Payload rejected, no retry
3737
Then a span name equals "span 1"
38-
And I discard the oldest trace

0 commit comments

Comments
 (0)