Skip to content

Commit 03478d2

Browse files
author
Robert Bartoszewski
committed
Fixed E2E tests
1 parent 4ea0fab commit 03478d2

14 files changed

+167
-271
lines changed

features/default/attributes.feature

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ Feature: Spans with custom attributes
22

33
Scenario: Set attributes in a span
44
Given I run "SetAttributesScenario"
5-
And I wait to receive at least 1 span
6-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
5+
And I wait to receive a span named "SetAttributesScenario"
6+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
77
* 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$"
8-
* a span field "name" equals "SetAttributesScenario"
98
* a span string attribute "a" equals "xyz"
109
* every span bool attribute "b" does not exist
1110
* every span bool attribute "d" does not exist
@@ -19,10 +18,9 @@ Feature: Spans with custom attributes
1918

2019
Scenario: Set attributes in a span with limits set
2120
Given I run "SetAttributesWithLimitsScenario"
22-
And I wait to receive at least 1 span
23-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
21+
And I wait to receive a span named "SetAttributesWithLimitsScenario"
22+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
2423
* 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$"
25-
* a span field "name" equals "SetAttributesWithLimitsScenario"
2624
* a span string attribute "a" equals "1234567890*** 1 CHARS TRUNCATED"
2725
* a span array attribute "b" contains the integer value 1 at index 0
2826
* a span array attribute "b" contains the integer value 2 at index 1
@@ -31,8 +29,7 @@ Feature: Spans with custom attributes
3129

3230
Scenario: Set attributes in a span with an attribute count limit set
3331
Given I run "SetAttributeCountLimitScenario"
34-
And I wait to receive at least 1 span
35-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
32+
And I wait to receive a span named "SetAttributeCountLimitScenario"
33+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
3634
* 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$"
37-
* a span field "name" equals "SetAttributeCountLimitScenario"
3835
* every span string attribute "a" does not exist

features/default/automatic/automatic_network.feature

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ Feature: Automatic network instrumentation spans
8686

8787
Scenario: Automatically start a network span that has a null URL
8888
Given I run "AutoInstrumentNetworkNullURLScenario"
89-
And I wait to receive at least 1 span
89+
And I wait to receive a span named "[HTTP/GET]"
9090
Then the trace "Content-Type" header equals "application/json"
9191
* 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$"
9292
* every span field "parentSpanId" does not exist
93-
* a span field "name" equals "[HTTP/GET]"
9493
* a span string attribute "http.flavor" exists
9594
# * a span string attribute "http.url" matches the regex "http://.*:9[0-9]{3}/reflect\?status=200"
9695
* a span string attribute "http.method" equals "GET"
@@ -109,11 +108,10 @@ Feature: Automatic network instrumentation spans
109108
Scenario: Automatically start a network span triggered by AVAssetDownloadURLSession (must not crash)
110109
Given I run "AutoInstrumentAVAssetScenario"
111110
And I wait for 2 seconds
112-
And I wait to receive at least 2 spans
111+
And I wait to receive a span named "[HTTP/GET]"
113112
Then the trace "Content-Type" header equals "application/json"
114113
* 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$"
115114
* every span field "parentSpanId" does not exist
116-
* a span field "name" equals "[HTTP/GET]"
117115
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
118116
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
119117
* a span field "kind" equals 1
@@ -198,10 +196,9 @@ Feature: Automatic network instrumentation spans
198196
# Wait for a long time because there can be a LOT of maze-runner related URL requests before the scenario starts.
199197
And I wait for 20 seconds
200198
# There will actually be any number of requests by this point since we're not filtering at all.
201-
And I wait to receive at least 1 span
199+
And I wait to receive a span named "[HTTP/GET]"
202200
Then the trace "Content-Type" header equals "application/json"
203201
* 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$"
204-
* a span field "name" equals "[HTTP/GET]"
205202
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
206203
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
207204
* every span field "kind" equals 3

0 commit comments

Comments
 (0)