diff --git a/.buildkite/browser-pipeline.full.yml b/.buildkite/browser-pipeline.full.yml
index 577b55fc8..967c31e4e 100644
--- a/.buildkite/browser-pipeline.full.yml
+++ b/.buildkite/browser-pipeline.full.yml
@@ -29,6 +29,7 @@ steps:
run: browser-maze-runner-bs
use-aliases: true
command:
+ - --https
- --farm=bs
- --browser={{ matrix }}
artifacts#v1.5.0:
diff --git a/.buildkite/browser-pipeline.yml b/.buildkite/browser-pipeline.yml
index 4667222fe..a5f33f6f9 100644
--- a/.buildkite/browser-pipeline.yml
+++ b/.buildkite/browser-pipeline.yml
@@ -46,6 +46,7 @@ steps:
use-aliases: true
service-ports: true
command:
+ - --https
- --farm=bb
- --browser={{ matrix.browser }}_{{ matrix.version }}
- --appium-version=1.22
@@ -78,6 +79,7 @@ steps:
run: browser-maze-runner-legacy
use-aliases: true
command:
+ - --https
- --farm=bs
- --browser={{ matrix.browser }}_{{ matrix.version }}
artifacts#v1.5.0:
@@ -97,5 +99,31 @@ steps:
adjustments:
- with: { browser: firefox, version: 60 }
- with: { browser: edge, version: 80 }
- - with: { browser: safari, version: 11 }
- with: { browser: edge, version: latest }
+
+ # BrowserStack non-https
+ - label: ":browserstack: :{{ matrix.browser }}: {{ matrix.version }} Browser non-https tests${EXTRA_STEP_LABEL}"
+ depends_on: "browser-maze-runner-legacy-${USE_CDN_BUILD}"
+ timeout_in_minutes: 30
+ plugins:
+ docker-compose#v4.12.0:
+ pull: browser-maze-runner-legacy
+ run: browser-maze-runner-legacy
+ use-aliases: true
+ command:
+ - --farm=bs
+ - --browser={{ matrix.browser }}_{{ matrix.version }}
+ artifacts#v1.5.0:
+ upload:
+ - "./test/browser/maze_output/failed/**/*"
+ test-collector#v1.10.2:
+ files: "reports/TEST-*.xml"
+ format: "junit"
+ branch: "^main|next$$"
+ api-token-env-name: "BROWSER_PERFORMANCE_BUILDKITE_ANALYTICS_TOKEN"
+ concurrency: 2
+ concurrency_group: "browserstack"
+ matrix:
+ setup:
+ browser: [safari]
+ version: [11]
\ No newline at end of file
diff --git a/test/browser/Gemfile.lock b/test/browser/Gemfile.lock
deleted file mode 100644
index 113de12f7..000000000
--- a/test/browser/Gemfile.lock
+++ /dev/null
@@ -1,128 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- appium_lib (12.0.1)
- appium_lib_core (~> 5.0)
- nokogiri (~> 1.8, >= 1.8.1)
- tomlrb (>= 1.1, < 3.0)
- appium_lib_core (5.4.0)
- faye-websocket (~> 0.11.0)
- selenium-webdriver (~> 4.2, < 4.6)
- bugsnag (6.27.1)
- concurrent-ruby (~> 1.0)
- bugsnag-maze-runner (9.13.0)
- appium_lib (~> 12.0.0)
- appium_lib_core (~> 5.4.0)
- bugsnag (~> 6.24)
- cucumber (~> 7.1)
- cucumber-expressions (~> 6.0.0)
- curb (~> 1.0.5)
- dogstatsd-ruby (~> 5.5.0)
- json_schemer (~> 0.2.24)
- optimist (~> 3.0.1)
- os (~> 1.0.0)
- rack (~> 2.2)
- rake (~> 12.3.3)
- rubyzip (~> 2.3.2)
- selenium-webdriver (~> 4.0)
- test-unit (~> 3.5.2)
- webrick (~> 1.7.0)
- builder (3.3.0)
- childprocess (4.1.0)
- concurrent-ruby (1.3.4)
- cucumber (7.1.0)
- builder (~> 3.2, >= 3.2.4)
- cucumber-core (~> 10.1, >= 10.1.0)
- cucumber-create-meta (~> 6.0, >= 6.0.1)
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
- cucumber-gherkin (~> 22.0, >= 22.0.0)
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
- cucumber-messages (~> 17.1, >= 17.1.1)
- cucumber-wire (~> 6.2, >= 6.2.0)
- diff-lcs (~> 1.4, >= 1.4.4)
- mime-types (~> 3.3, >= 3.3.1)
- multi_test (~> 0.1, >= 0.1.2)
- sys-uname (~> 1.2, >= 1.2.2)
- cucumber-core (10.1.1)
- cucumber-gherkin (~> 22.0, >= 22.0.0)
- cucumber-messages (~> 17.1, >= 17.1.1)
- cucumber-tag-expressions (~> 4.1, >= 4.1.0)
- cucumber-create-meta (6.0.4)
- cucumber-messages (~> 17.1, >= 17.1.1)
- sys-uname (~> 1.2, >= 1.2.2)
- cucumber-cucumber-expressions (14.0.0)
- cucumber-expressions (6.0.1)
- cucumber-gherkin (22.0.0)
- cucumber-messages (~> 17.1, >= 17.1.1)
- cucumber-html-formatter (17.0.0)
- cucumber-messages (~> 17.1, >= 17.1.0)
- cucumber-messages (17.1.1)
- cucumber-tag-expressions (4.1.0)
- cucumber-wire (6.2.1)
- cucumber-core (~> 10.1, >= 10.1.0)
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
- curb (1.0.5)
- diff-lcs (1.5.1)
- dogstatsd-ruby (5.5.0)
- ecma-re-validator (0.4.0)
- regexp_parser (~> 2.2)
- eventmachine (1.2.7)
- faye-websocket (0.11.3)
- eventmachine (>= 0.12.0)
- websocket-driver (>= 0.5.1)
- ffi (1.17.0-arm64-darwin)
- ffi (1.17.0-x86_64-darwin)
- hana (1.3.7)
- json_schemer (0.2.25)
- ecma-re-validator (~> 0.3)
- hana (~> 1.3)
- regexp_parser (~> 2.0)
- simpleidn (~> 0.2)
- uri_template (~> 0.7)
- mime-types (3.5.2)
- mime-types-data (~> 3.2015)
- mime-types-data (3.2024.0806)
- multi_test (0.1.2)
- nokogiri (1.16.7-arm64-darwin)
- racc (~> 1.4)
- nokogiri (1.16.7-x86_64-darwin)
- racc (~> 1.4)
- optimist (3.0.1)
- os (1.0.1)
- power_assert (2.0.3)
- racc (1.8.1)
- rack (2.2.9)
- rake (12.3.3)
- regexp_parser (2.9.2)
- rexml (3.3.5)
- strscan
- rubyzip (2.3.2)
- selenium-webdriver (4.5.0)
- childprocess (>= 0.5, < 5.0)
- rexml (~> 3.2, >= 3.2.5)
- rubyzip (>= 1.2.2, < 3.0)
- websocket (~> 1.0)
- simpleidn (0.2.3)
- strscan (3.1.0)
- sys-uname (1.3.0)
- ffi (~> 1.1)
- test-unit (3.5.9)
- power_assert
- tomlrb (2.0.3)
- uri_template (0.7.0)
- webrick (1.7.0)
- websocket (1.2.11)
- websocket-driver (0.7.6)
- websocket-extensions (>= 0.1.0)
- websocket-extensions (0.1.5)
-
-PLATFORMS
- arm64-darwin-21
- arm64-darwin-23
- x86_64-darwin-19
-
-DEPENDENCIES
- bugsnag-maze-runner (~> 9.0)
-
-BUNDLED WITH
- 2.4.8
diff --git a/test/browser/TESTING.md b/test/browser/TESTING.md
index 08beec343..8567aca51 100644
--- a/test/browser/TESTING.md
+++ b/test/browser/TESTING.md
@@ -11,13 +11,13 @@ brew install chromedriver
To run all the tests, run the following in `test/browser`:
```sh
-bundle exec maze-runner --farm=local --browser=chrome
+bundle exec maze-runner --https --farm=local --browser=chrome
```
Or to run a single feature file:
```sh
-bundle exec maze-runner --farm=local --browser=chrome features/device.feature
+bundle exec maze-runner --https --farm=local --browser=chrome features/device.feature
```
## Running the end-to-end tests with BrowserStack
@@ -34,11 +34,11 @@ The browsers available to test on are the keys in [`browsers.yml`](https://githu
To run all the tests, run the following in `test/browser`:
```sh
-bundle exec maze-runner --farm=bs --browser=chrome_latest
+bundle exec maze-runner --https --farm=bs --browser=chrome_latest
```
Or to run a single feature file:
```sh
-bundle exec maze-runner --farm=bs --browser=chrome_latest features/manual-spans.feature
+bundle exec maze-runner --https --farm=bs --browser=chrome_latest features/manual-spans.feature
```
diff --git a/test/browser/features/angular.feature b/test/browser/features/angular.feature
index 2973a5cad..3e13a291c 100644
--- a/test/browser/features/angular.feature
+++ b/test/browser/features/angular.feature
@@ -5,7 +5,7 @@
Feature: Angular
Scenario: Angular route change spans are automatically instrumented
- Given I navigate to the test URL "/angular/dist"
+ Given I navigate to the test URL "/docs/angular/dist"
And the element "customers" is present
And I click the element "customers"
When I wait to receive 1 trace
@@ -25,7 +25,7 @@ Feature: Angular
| bugsnag.browser.page.route_change.trigger | stringValue | imperative |
Scenario: Route with a custom URL matcher
- Given I navigate to the test URL "/angular/dist"
+ Given I navigate to the test URL "/docs/angular/dist"
And the element "customMatching" is present
And I click the element "customMatching"
When I wait to receive 1 trace
diff --git a/test/browser/features/custom-attributes.feature b/test/browser/features/custom-attributes.feature
index e027661bb..55a8e1cd9 100644
--- a/test/browser/features/custom-attributes.feature
+++ b/test/browser/features/custom-attributes.feature
@@ -1,7 +1,7 @@
Feature: Custom attributes
Scenario: Custom attributes can be added to spans
- Given I navigate to the test URL "/custom-attributes"
+ Given I navigate to the test URL "/docs/custom-attributes"
And I wait for 1 span
Then a span named "Custom/CustomAttributesScenario" contains the attributes:
diff --git a/test/browser/features/device-id.feature b/test/browser/features/device-id.feature
index 6b35d6603..8163cacab 100644
--- a/test/browser/features/device-id.feature
+++ b/test/browser/features/device-id.feature
@@ -2,13 +2,13 @@ Feature: Device ID persistence
Scenario: persisted device ID is used if present
# load the page and persist an ID
- Given I navigate to the test URL "/retry-scenario"
+ Given I navigate to the test URL "/docs/retry-scenario"
And I wait to receive a sampling request
And I store the device ID "c1234567890abcdefghijklmnop"
# reload the page to prove the ID was persisted and not just available in
# memory somehow
- When I navigate to the test URL "/retry-scenario"
+ When I navigate to the test URL "/docs/retry-scenario"
And I wait to receive a sampling request
And I click the element "send-first-span"
And I wait for 1 span
diff --git a/test/browser/features/enabled-release-stages.feature b/test/browser/features/enabled-release-stages.feature
index 245b92fae..d819b59c2 100644
--- a/test/browser/features/enabled-release-stages.feature
+++ b/test/browser/features/enabled-release-stages.feature
@@ -1,11 +1,11 @@
Feature: Configuration
Scenario: Delivery is prevented when releaseStage is not in enabledReleaseStages
- Given I navigate to the test URL "/enabled-release-stages-disabled"
+ Given I navigate to the test URL "/docs/enabled-release-stages-disabled"
Then I should receive no traces
Scenario: Delivery is allowed when releaseStage is present in enabledReleaseStages
- Given I navigate to the test URL "/enabled-release-stages"
+ Given I navigate to the test URL "/docs/enabled-release-stages"
And I wait to receive at least 1 trace
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "Custom/Should send"
And the trace payload field "resourceSpans.0.resource" string attribute "deployment.environment" equals "test"
diff --git a/test/browser/features/error-correlation.feature b/test/browser/features/error-correlation.feature
index 8a7cd416c..4880e6826 100644
--- a/test/browser/features/error-correlation.feature
+++ b/test/browser/features/error-correlation.feature
@@ -1,7 +1,7 @@
Feature: Error Correlation
Scenario: Error does not include the correlation property when no spans are open
- Given I navigate to the test URL "/error-correlation"
+ Given I navigate to the test URL "/docs/error-correlation"
And I wait to receive a sampling request
And I click the element "send-error"
And I wait to receive an error
@@ -9,7 +9,7 @@ Feature: Error Correlation
And the error payload field "events.0.correlation" is null
Scenario: Reported errors include the current trace and span id
- Given I navigate to the test URL "/error-correlation"
+ Given I navigate to the test URL "/docs/error-correlation"
And I wait to receive a sampling request
Then I click the element "start-span"
And I wait for 1 second
@@ -33,7 +33,7 @@ Feature: Error Correlation
And the error payload field "events.0.correlation.traceId" equals the stored value "traceId"
Scenario: Reported errors do not include the trace and span id if the span is not the current context
- Given I navigate to the test URL "/error-correlation"
+ Given I navigate to the test URL "/docs/error-correlation"
And I wait to receive a sampling request
Then I click the element "start-span"
And I wait for 1 second
diff --git a/test/browser/features/fixed-sampling-probability.feature b/test/browser/features/fixed-sampling-probability.feature
index af375f220..3bf9278cd 100644
--- a/test/browser/features/fixed-sampling-probability.feature
+++ b/test/browser/features/fixed-sampling-probability.feature
@@ -1,7 +1,7 @@
Feature: Fixed Sampling Probability
Scenario: Uses configured sampling probability
- Given I navigate to the test URL "/fixed-sampling-probability"
+ Given I navigate to the test URL "/docs/fixed-sampling-probability"
And I enter unmanaged traces mode
When I click the element "send-span"
And I wait to receive 1 trace
diff --git a/test/browser/features/fixtures/packages/angular/src/index.html b/test/browser/features/fixtures/packages/angular/src/index.html
index e2c0b6b82..6523fb01a 100644
--- a/test/browser/features/fixtures/packages/angular/src/index.html
+++ b/test/browser/features/fixtures/packages/angular/src/index.html
@@ -2,9 +2,9 @@
-
+
Angular
-
+
diff --git a/test/browser/features/fixtures/packages/react-router/index.html b/test/browser/features/fixtures/packages/react-router/index.html
index f3f0a2bb1..b01d0bfbd 100644
--- a/test/browser/features/fixtures/packages/react-router/index.html
+++ b/test/browser/features/fixtures/packages/react-router/index.html
@@ -2,7 +2,7 @@
-
+
React router
diff --git a/test/browser/features/fixtures/packages/react-router/src/index.jsx b/test/browser/features/fixtures/packages/react-router/src/index.jsx
index b0034814d..518236a81 100644
--- a/test/browser/features/fixtures/packages/react-router/src/index.jsx
+++ b/test/browser/features/fixtures/packages/react-router/src/index.jsx
@@ -13,7 +13,7 @@ const parameters = new URLSearchParams(window.location.search)
const apiKey = parameters.get('api_key')
const endpoint = parameters.get('endpoint')
-const basename = '/react-router'
+const basename = '/docs/react-router'
function Root() {
return (
diff --git a/test/browser/features/fixtures/packages/resource-load-spans/index.html b/test/browser/features/fixtures/packages/resource-load-spans/index.html
index fbe5994ac..dd8f6ac8c 100644
--- a/test/browser/features/fixtures/packages/resource-load-spans/index.html
+++ b/test/browser/features/fixtures/packages/resource-load-spans/index.html
@@ -2,11 +2,11 @@
-
+
-
+
Resource load spans
diff --git a/test/browser/features/fixtures/packages/resource-load-spans/src/index.js b/test/browser/features/fixtures/packages/resource-load-spans/src/index.js
index b2ec76a61..cf1ad579d 100644
--- a/test/browser/features/fixtures/packages/resource-load-spans/src/index.js
+++ b/test/browser/features/fixtures/packages/resource-load-spans/src/index.js
@@ -12,7 +12,7 @@ document.getElementById("end-span").addEventListener("click", () => {
const node = document.getElementById("image-container")
const img = new Image()
node.appendChild(img)
- img.src = "/favicon.png?height=100&width=100"
+ img.src = "/docs/favicon.png?height=100&width=100"
img.onload = () => {
span.end()
}
diff --git a/test/browser/features/fixtures/packages/route-change-spans/index.html b/test/browser/features/fixtures/packages/route-change-spans/index.html
index 20b94cb16..4a5eaa0da 100644
--- a/test/browser/features/fixtures/packages/route-change-spans/index.html
+++ b/test/browser/features/fixtures/packages/route-change-spans/index.html
@@ -2,7 +2,7 @@
-
+
Route change spans
diff --git a/test/browser/features/fixtures/packages/route-change-spans/src/app.jsx b/test/browser/features/fixtures/packages/route-change-spans/src/app.jsx
index 5aa12fdd9..e8b95b96a 100644
--- a/test/browser/features/fixtures/packages/route-change-spans/src/app.jsx
+++ b/test/browser/features/fixtures/packages/route-change-spans/src/app.jsx
@@ -12,7 +12,7 @@ function Navigation() {
- Home
+ Home
Change Route
@@ -27,7 +27,7 @@ function App() {
-
+
diff --git a/test/browser/features/fixtures/packages/vue-router/index.html b/test/browser/features/fixtures/packages/vue-router/index.html
index 8e29b3adb..7ffe5ff60 100644
--- a/test/browser/features/fixtures/packages/vue-router/index.html
+++ b/test/browser/features/fixtures/packages/vue-router/index.html
@@ -2,6 +2,7 @@
+
Vue router
diff --git a/test/browser/features/fixtures/packages/vue-router/src/main.js b/test/browser/features/fixtures/packages/vue-router/src/main.js
index 9b77145cf..4605a6446 100644
--- a/test/browser/features/fixtures/packages/vue-router/src/main.js
+++ b/test/browser/features/fixtures/packages/vue-router/src/main.js
@@ -9,7 +9,7 @@ const parameters = new URLSearchParams(window.location.search)
const apiKey = parameters.get('api_key')
const endpoint = parameters.get('endpoint')
-const base = '/vue-router'
+const base = '/docs/vue-router'
const router = createRouter({
history: createWebHistory(base),
diff --git a/test/browser/features/lib/url-generator.rb b/test/browser/features/lib/url-generator.rb
index 6cc2c37e1..fe1600515 100644
--- a/test/browser/features/lib/url-generator.rb
+++ b/test/browser/features/lib/url-generator.rb
@@ -5,7 +5,7 @@ def initialize(maze_uri, fixtures_uri)
end
def for_path(path)
- uri = URI.join(@fixtures_uri, path)
+ uri = URI.join(@maze_uri, path)
config_query_string = "endpoint=#{@maze_uri}/traces&logs=#{@maze_uri}/logs&api_key=#{$api_key}¬ify=#{@maze_uri}/notify&sessions=#{@maze_uri}/sessions"
if uri.query
diff --git a/test/browser/features/manual-spans.feature b/test/browser/features/manual-spans.feature
index 17e2bee4e..15cd1a8bf 100644
--- a/test/browser/features/manual-spans.feature
+++ b/test/browser/features/manual-spans.feature
@@ -1,7 +1,7 @@
Feature: Manual creation of spans
Scenario: Manual spans can be logged
- Given I navigate to the test URL "/manual-span"
+ Given I navigate to the test URL "/docs/manual-span"
And I wait to receive a sampling request
Then I click the element "send-span"
And I wait for 1 span
@@ -23,7 +23,7 @@ Feature: Manual creation of spans
And the trace payload field "resourceSpans.0.resource" string attribute "service.name" equals "manual-span"
Scenario: isFirstClass span option can be set to false
- Given I navigate to the test URL "/manual-span?isFirstClass=false"
+ Given I navigate to the test URL "/docs/manual-span?isFirstClass=false"
And I wait to receive a sampling request
Then I click the element "send-span"
And I wait for 1 span
@@ -46,7 +46,7 @@ Feature: Manual creation of spans
@chromium_only @local_only
Scenario: userAgentData is included in custom span
- Given I navigate to the test URL "/manual-span"
+ Given I navigate to the test URL "/docs/manual-span"
And I wait to receive a sampling request
When I click the element "send-span"
And I wait for 1 span
@@ -62,7 +62,7 @@ Feature: Manual creation of spans
| Unknown |
Scenario: Spans can be logged before start
- Given I navigate to the test URL "/pre-start-spans"
+ Given I navigate to the test URL "/docs/pre-start-spans"
When I wait to receive at least 1 trace
Then a span name equals "Custom/Post Start"
And a span name equals "Custom/Pre Start Span 0"
diff --git a/test/browser/features/navigation-changes.feature b/test/browser/features/navigation-changes.feature
index c52f085ff..279afd72a 100644
--- a/test/browser/features/navigation-changes.feature
+++ b/test/browser/features/navigation-changes.feature
@@ -2,7 +2,7 @@
Feature: Navigation changes
@skip_span_time_validation
Scenario: Batch is sent when navigating to a new page by clicking an anchor tag
- Given I navigate to the test URL "/navigation-changes"
+ Given I navigate to the test URL "/docs/navigation-changes"
When I click the element "add-span-to-batch"
And I click the element "add-span-to-batch"
@@ -18,7 +18,7 @@ Feature: Navigation changes
@skip_span_time_validation
Scenario: Batch is sent when navigating to a new page by entering a new URL
- Given I navigate to the test URL "/navigation-changes"
+ Given I navigate to the test URL "/docs/navigation-changes"
When I click the element "add-span-to-batch"
And I click the element "add-span-to-batch"
And I click the element "add-span-to-batch"
@@ -36,7 +36,7 @@ Feature: Navigation changes
@minimises_window
Scenario: Batch is sent when the window is minimised
- Given I navigate to the test URL "/navigation-changes"
+ Given I navigate to the test URL "/docs/navigation-changes"
When I click the element "add-span-to-batch"
And I click the element "add-span-to-batch"
And I click the element "add-span-to-batch"
diff --git a/test/browser/features/nested-spans.feature b/test/browser/features/nested-spans.feature
index 8acfdec25..1a82c4668 100644
--- a/test/browser/features/nested-spans.feature
+++ b/test/browser/features/nested-spans.feature
@@ -1,7 +1,7 @@
Feature: Nested spans
Scenario: Spans are nested under the correct parent context
- Given I navigate to the test URL "/nested-spans"
+ Given I navigate to the test URL "/docs/nested-spans"
And I wait for 5 spans
# Root span should have no parent
diff --git a/test/browser/features/network-spans.feature b/test/browser/features/network-spans.feature
index 6e32b21a4..2eec6393b 100644
--- a/test/browser/features/network-spans.feature
+++ b/test/browser/features/network-spans.feature
@@ -1,7 +1,7 @@
Feature: Network spans
Scenario: Manual network spans
- Given I navigate to the test URL "/manual-span"
+ Given I navigate to the test URL "/docs/manual-span"
When I click the element "send-network-span"
And I wait to receive 1 trace
@@ -14,7 +14,7 @@ Feature: Network spans
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" integer attribute "http.status_code" equals 200
Scenario: Network spans are automatically instrumented for completed XHR requests
- Given I navigate to the test URL "/network-spans"
+ Given I navigate to the test URL "/docs/network-spans"
When I click the element "xhr-success"
And I wait to receive 1 trace
@@ -23,11 +23,11 @@ Feature: Network spans
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.browser.page.title" equals "Network spans"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.browser.page.url" equals the stored value "bugsnag.browser.page.url"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.method" equals "GET"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http(s)?:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" integer attribute "http.status_code" equals 200
Scenario: Network spans are automatically instrumented for completed fetch requests
- Given I navigate to the test URL "/network-spans"
+ Given I navigate to the test URL "/docs/network-spans"
When I click the element "fetch-success"
And I wait to receive 1 trace
@@ -36,40 +36,40 @@ Feature: Network spans
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.browser.page.title" equals "Network spans"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.browser.page.url" equals the stored value "bugsnag.browser.page.url"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.method" equals "GET"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http(s)?:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" integer attribute "http.status_code" equals 200
Scenario: Network spans are not instrumented for failed requests
- Given I navigate to the test URL "/network-spans"
+ Given I navigate to the test URL "/docs/network-spans"
When I click the element "failed-requests"
Then I should have received no spans
Scenario: Attributes can be modified by networkRequestCallback using fetch
- Given I navigate to the test URL "/network-span-control"
+ Given I navigate to the test URL "/docs/network-span-control"
When I click the element "fetch-modified-url"
And I wait to receive 1 trace
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.method" equals "GET"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0¬-your-ordinary-url=true$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http(s)?:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0¬-your-ordinary-url=true$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" integer attribute "http.status_code" equals 200
Scenario: Attributes can be modified by networkRequestCallback using xhr
- Given I navigate to the test URL "/network-span-control"
+ Given I navigate to the test URL "/docs/network-span-control"
When I click the element "xhr-modified-url"
And I wait to receive 1 trace
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.method" equals "GET"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0¬-your-ordinary-url=true$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.url" matches the regex "^http(s)?:\/\/.+:\d{4}\/reflect\?status=200\&delay_ms=0¬-your-ordinary-url=true$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" integer attribute "http.status_code" equals 200
Scenario: Delivery of spans can be prevented by networkRequestCallback using fetch
- Given I navigate to the test URL "/network-span-control"
+ Given I navigate to the test URL "/docs/network-span-control"
When I click the element "fetch-prevented"
Then I should have received no spans
Scenario: Delivery of spans can be prevented by networkRequestCallback using xhr
- Given I navigate to the test URL "/network-span-control"
+ Given I navigate to the test URL "/docs/network-span-control"
When I click the element "xhr-prevented"
Then I should have received no spans
diff --git a/test/browser/features/page-load-spans.feature b/test/browser/features/page-load-spans.feature
index 29ac3e257..571a64e10 100644
--- a/test/browser/features/page-load-spans.feature
+++ b/test/browser/features/page-load-spans.feature
@@ -1,50 +1,50 @@
@requires_performance_navigation_timing
Feature: Page Load spans
Scenario: Page load spans are automatically instrumented
- Given I navigate to the test URL "/page-load-spans"
+ Given I navigate to the test URL "/docs/page-load-spans"
# click a button to record a first input delay metric
And I click the element "stop-clock"
And I wait to receive 1 trace
- Then a span named "[FullPageLoad]/page-load-spans/" contains the attributes:
- | attribute | type | value |
- | bugsnag.span.category | stringValue | full_page_load |
- | bugsnag.browser.page.title | stringValue | New title |
- | bugsnag.browser.page.route | stringValue | /page-load-spans/ |
+ Then a span named "[FullPageLoad]/docs/page-load-spans/" contains the attributes:
+ | attribute | type | value |
+ | bugsnag.span.category | stringValue | full_page_load |
+ | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.route | stringValue | /docs/page-load-spans/ |
# Validate all web vitals events and attributes are present, depending on browser support (browser-steps.rb)
- And the span named "[FullPageLoad]/page-load-spans/" is a valid full page load span
+ And the span named "[FullPageLoad]/docs/page-load-spans/" is a valid full page load span
# All spans should have a page url attribute
- And every span string attribute "bugsnag.browser.page.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/page-load-spans\/\?endpoint=.*\&logs=.*\&api_key=.*$"
+ And every span string attribute "bugsnag.browser.page.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/docs\/page-load-spans\/\?endpoint=.*\&logs=.*\&api_key=.*$"
# We expect the following spans to always be present
- And a span named "[PageLoadPhase/HTTPRequest]/page-load-spans/" has a parent named "[FullPageLoad]/page-load-spans/"
- And a span named "[PageLoadPhase/HTTPRequest]/page-load-spans/" contains the attributes:
+ And a span named "[PageLoadPhase/HTTPRequest]/docs/page-load-spans/" has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And a span named "[PageLoadPhase/HTTPRequest]/docs/page-load-spans/" contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | HTTPRequest |
- And a span named "[PageLoadPhase/HTTPResponse]/page-load-spans/" has a parent named "[FullPageLoad]/page-load-spans/"
- And a span named "[PageLoadPhase/HTTPResponse]/page-load-spans/" contains the attributes:
+ And a span named "[PageLoadPhase/HTTPResponse]/docs/page-load-spans/" has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And a span named "[PageLoadPhase/HTTPResponse]/docs/page-load-spans/" contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | HTTPResponse |
- And a span named "[PageLoadPhase/DomContentLoadedEvent]/page-load-spans/" has a parent named "[FullPageLoad]/page-load-spans/"
- And a span named "[PageLoadPhase/DomContentLoadedEvent]/page-load-spans/" contains the attributes:
+ And a span named "[PageLoadPhase/DomContentLoadedEvent]/docs/page-load-spans/" has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And a span named "[PageLoadPhase/DomContentLoadedEvent]/docs/page-load-spans/" contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | DomContentLoadedEvent |
- And a span named "[PageLoadPhase/LoadEvent]/page-load-spans/" has a parent named "[FullPageLoad]/page-load-spans/"
- And a span named "[PageLoadPhase/LoadEvent]/page-load-spans/" contains the attributes:
+ And a span named "[PageLoadPhase/LoadEvent]/docs/page-load-spans/" has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And a span named "[PageLoadPhase/LoadEvent]/docs/page-load-spans/" contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | LoadEvent |
# The following spans may or may not be present in the trace. In most cases this is
@@ -52,67 +52,67 @@ Feature: Page Load spans
# performance entry are 0, but may also be down to differences in browser behaviour (e.g. Redirect)
# Redirect may have 0 start and end times
- And if a span named "[PageLoadPhase/Redirect]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/Redirect]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/Redirect]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/Redirect]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | Redirect |
# Unload may have 0 start and end times
- And if a span named "[PageLoadPhase/Unload]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/Unload]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/Unload]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/Unload]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | Unload |
# LoadFromCache may have 0 start and end times
- And if a span named "[PageLoadPhase/LoadFromCache]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/LoadFromCache]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/LoadFromCache]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/LoadFromCache]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | LoadFromCache |
# DNSLookup may have 0 start and end times
- And if a span named "[PageLoadPhase/DNSLookup]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/DNSLookup]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/DNSLookup]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/DNSLookup]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | DNSLookup |
# TCPHandshake may have 0 start and end times
- And if a span named "[PageLoadPhase/TCPHandshake]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/TCPHandshake]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/TCPHandshake]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/TCPHandshake]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | TCPHandshake |
# TLS may have 0 start and end times
- And if a span named "[PageLoadPhase/TLS]/page-load-spans/" exists, it has a parent named "[FullPageLoad]/page-load-spans/"
- And if a span named "[PageLoadPhase/TLS]/page-load-spans/" exists, it contains the attributes:
+ And if a span named "[PageLoadPhase/TLS]/docs/page-load-spans/" exists, it has a parent named "[FullPageLoad]/docs/page-load-spans/"
+ And if a span named "[PageLoadPhase/TLS]/docs/page-load-spans/" exists, it contains the attributes:
| attribute | type | value |
| bugsnag.span.category | stringValue | page_load_phase |
- | bugsnag.browser.page.title | stringValue | New title |
+ | bugsnag.browser.page.title | stringValue | New title |
| bugsnag.phase | stringValue | TLS |
Scenario: Page load spans can have attributes dropped by sendPageAttributes config
- Given I navigate to the test URL "/network-span-control"
+ Given I navigate to the test URL "/docs/network-span-control"
When I click the element "page-load-no-attributes"
And I wait to receive 1 trace
- Then a span named "[FullPageLoad]/network-span-control/" does not contain the attribute "bugsnag.browser.page.title"
- And a span named "[FullPageLoad]/network-span-control/" does not contain the attribute "bugsnag.browser.page.url"
- And a span named "[FullPageLoad]/network-span-control/" does not contain the attribute "bugsnag.browser.page.referrer"
+ Then a span named "[FullPageLoad]/docs/network-span-control/" does not contain the attribute "bugsnag.browser.page.title"
+ And a span named "[FullPageLoad]/docs/network-span-control/" does not contain the attribute "bugsnag.browser.page.url"
+ And a span named "[FullPageLoad]/docs/network-span-control/" does not contain the attribute "bugsnag.browser.page.referrer"
Scenario: Page load spans inherit parent context from traceparent meta tag if present
- Given I navigate to the test URL "/traceparent-meta"
+ Given I navigate to the test URL "/docs/traceparent-meta"
And I wait to receive 1 trace
- Then a span named "[FullPageLoad]/traceparent-meta/" has the following properties:
+ Then a span named "[FullPageLoad]/docs/traceparent-meta/" has the following properties:
| property | value |
| parentSpanId | 6647406222c42487 |
| traceId | d2b0a64e3730b6ca065236508b85e069 |
\ No newline at end of file
diff --git a/test/browser/features/react-router.feature b/test/browser/features/react-router.feature
index 868c71a1e..ab9d0d3a6 100644
--- a/test/browser/features/react-router.feature
+++ b/test/browser/features/react-router.feature
@@ -4,7 +4,7 @@
Feature: React router
Scenario: React route change spans are automatically instrumented
- Given I navigate to the test URL "/react-router"
+ Given I navigate to the test URL "/docs/react-router"
And I click the element "change-route"
When I wait to receive 1 span
Then a span named "[RouteChange]/contacts/:contactId" contains the attributes:
diff --git a/test/browser/features/resource-load-spans.feature b/test/browser/features/resource-load-spans.feature
index 1a1bd75b5..770a4690c 100644
--- a/test/browser/features/resource-load-spans.feature
+++ b/test/browser/features/resource-load-spans.feature
@@ -3,7 +3,7 @@ Feature: Resource Load Spans
@requires_resource_load_spans
Scenario: Resource load spans are automatically instrumented (NPM build)
Given I set the sampling probability to "0.999999"
- And I navigate to the test URL "/resource-load-spans"
+ And I navigate to the test URL "/docs/resource-load-spans"
And I wait to receive a sampling request
When I click the element "end-span"
@@ -15,17 +15,17 @@ Feature: Resource Load Spans
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" double attribute "bugsnag.sampling.p" equals 0.999999
# App bundle
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" matches the regex "^\[ResourceLoad\]http:\/\/.*:[0-9]{4}\/resource-load-spans\/dist\/bundle\.js$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" matches the regex "^\[ResourceLoad\]https:\/\/.*:[0-9]{4}\/docs\/resource-load-spans\/dist\/bundle\.js$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.parentSpanId" equals the stored value "parent_span_id"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.span.category" equals "resource_load"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.flavor" equals "1.1"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" double attribute "bugsnag.sampling.p" equals 0.999999
# Image
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.name" matches the regex "^\[ResourceLoad\]http:\/\/.*:[0-9]{4}\/favicon.png$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.name" matches the regex "^\[ResourceLoad\]https:\/\/.*:[0-9]{4}\/docs\/favicon.png$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.parentSpanId" equals the stored value "parent_span_id"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" string attribute "bugsnag.span.category" equals "resource_load"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" string attribute "http.url" matches the regex "^http:\/\/.*:[0-9]{4}\/favicon\.png\?height=100&width=100$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" string attribute "http.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/docs\/favicon\.png\?height=100&width=100$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" string attribute "http.flavor" equals "1.1"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" double attribute "bugsnag.sampling.p" equals 0.999999
@@ -33,7 +33,7 @@ Feature: Resource Load Spans
@requires_resource_load_spans
Scenario: Resource load spans are automatically instrumented (CDN build)
Given I set the sampling probability to "0.999999"
- And I navigate to the test URL "/resource-load-spans"
+ And I navigate to the test URL "/docs/resource-load-spans"
And I wait to receive a sampling request
When I click the element "end-span"
@@ -45,22 +45,22 @@ Feature: Resource Load Spans
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.3" double attribute "bugsnag.sampling.p" equals 0.999999
# App bundle
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" matches the regex "^\[ResourceLoad\]http:\/\/.*:[0-9]{4}\/resource-load-spans\/dist\/bundle\.js$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" matches the regex "^\[ResourceLoad\]https:\/\/.*:[0-9]{4}\/docs\/resource-load-spans\/dist\/bundle\.js$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.parentSpanId" equals the stored value "parent_span_id"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.span.category" equals "resource_load"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "http.flavor" equals "1.1"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" double attribute "bugsnag.sampling.p" equals 0.999999
# CDN bundle
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.name" matches the regex "^\[ResourceLoad\]http:\/\/.*:[0-9]{4}\/bugsnag-performance(?:\.min)?\.js$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.name" matches the regex "^\[ResourceLoad\]https:\/\/.*:[0-9]{4}\/bugsnag-performance(?:\.min)?\.js$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.parentSpanId" equals the stored value "parent_span_id"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" string attribute "bugsnag.span.category" equals "resource_load"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.1" double attribute "bugsnag.sampling.p" equals 0.999999
# Image
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2.name" matches the regex "^\[ResourceLoad\]http:\/\/.*:[0-9]{4}\/favicon.png$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2.name" matches the regex "^\[ResourceLoad\]https:\/\/.*:[0-9]{4}\/docs\/favicon.png$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2.parentSpanId" equals the stored value "parent_span_id"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" string attribute "bugsnag.span.category" equals "resource_load"
- And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" string attribute "http.url" matches the regex "^http:\/\/.*:[0-9]{4}\/favicon\.png\?height=100&width=100$"
+ And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" string attribute "http.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/docs\/favicon\.png\?height=100&width=100$"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" string attribute "http.flavor" equals "1.1"
And the trace payload field "resourceSpans.0.scopeSpans.0.spans.2" double attribute "bugsnag.sampling.p" equals 0.999999
diff --git a/test/browser/features/retries.feature b/test/browser/features/retries.feature
index 6d4318d6d..4e97276c7 100644
--- a/test/browser/features/retries.feature
+++ b/test/browser/features/retries.feature
@@ -1,7 +1,7 @@
Feature: Retries
Scenario Outline: Batch is retried with specified status codes
- Given I navigate to the test URL "/retry-scenario"
+ Given I navigate to the test URL "/docs/retry-scenario"
And I wait to receive a sampling request
And I set the HTTP status code for the next "POST" request to
@@ -29,7 +29,7 @@ Feature: Retries
| 500 | Connection Error |
Scenario: Batch is retried with connection failure
- Given I navigate to the test URL "/connection-failure"
+ Given I navigate to the test URL "/docs/connection-failure"
When I click the element "send-span"
And I wait for 10 seconds
@@ -42,7 +42,7 @@ Feature: Retries
And a span name equals "Custom/Span 2"
Scenario Outline: Batch is not retried with specified status codes
- Given I navigate to the test URL "/retry-scenario"
+ Given I navigate to the test URL "/docs/retry-scenario"
And I wait to receive a sampling request
And I set the HTTP status code for the next "POST" request to
@@ -66,7 +66,7 @@ Feature: Retries
# Status code 408 cannot be tested on certain browsers as it
# is automatically retried and does not behave as expected
Scenario Outline: Oldest batch is removed when max retry queue size is exceeded
- Given I navigate to the test URL "/oldest-batch-removed"
+ Given I navigate to the test URL "/docs/oldest-batch-removed"
And I wait to receive a sampling request
And I set the HTTP status code for the next 2 "POST" requests to
diff --git a/test/browser/features/route-change-spans.feature b/test/browser/features/route-change-spans.feature
index c170f85f4..a69785e4a 100644
--- a/test/browser/features/route-change-spans.feature
+++ b/test/browser/features/route-change-spans.feature
@@ -1,29 +1,29 @@
Feature: Route change spans
Scenario: Route change spans are automatically instrumented
- Given I navigate to the test URL "/route-change-spans"
+ Given I navigate to the test URL "/docs/route-change-spans"
And I click the element "change-route"
When I wait to receive 1 trace
Then every span string attribute "bugsnag.browser.page.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/new-route$"
And a span named "[RouteChange]/new-route" contains the attributes:
- | attribute | type | value |
- | bugsnag.span.category | stringValue | route_change |
- | bugsnag.browser.page.title | stringValue | New Route |
+ | attribute | type | value |
+ | bugsnag.span.category | stringValue | route_change |
+ | bugsnag.browser.page.title | stringValue | New Route |
| bugsnag.browser.page.route | stringValue | /new-route |
- | bugsnag.browser.page.previous_route | stringValue | /route-change-spans/ |
- | bugsnag.browser.page.route_change.trigger | stringValue | pushState |
+ | bugsnag.browser.page.previous_route | stringValue | /docs/route-change-spans/ |
+ | bugsnag.browser.page.route_change.trigger | stringValue | pushState |
Scenario: Hyperlinks within a page
- Given I navigate to the test URL "/route-change-spans"
+ Given I navigate to the test URL "/docs/route-change-spans"
And I click the element "go-to-anchor"
When I wait to receive 1 trace
- Then every span string attribute "bugsnag.browser.page.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/route-change-spans(\/)?\?endpoint=.*\&logs=.*\&api_key=.*#anchor-link$"
- Then a span named "[RouteChange]/route-change-spans/" contains the attributes:
- | attribute | type | value |
- | bugsnag.span.category | stringValue | route_change |
- | bugsnag.browser.page.title | stringValue | Route change spans |
- | bugsnag.browser.page.route | stringValue | /route-change-spans/ |
- | bugsnag.browser.page.previous_route | stringValue | /route-change-spans/ |
- | bugsnag.browser.page.route_change.trigger | stringValue | popstate |
+ Then every span string attribute "bugsnag.browser.page.url" matches the regex "^http(s)?:\/\/.*:[0-9]{4}\/docs\/route-change-spans(\/)?\?endpoint=.*\&logs=.*\&api_key=.*#anchor-link$"
+ Then a span named "[RouteChange]/docs/route-change-spans/" contains the attributes:
+ | attribute | type | value |
+ | bugsnag.span.category | stringValue | route_change |
+ | bugsnag.browser.page.title | stringValue | Route change spans |
+ | bugsnag.browser.page.route | stringValue | /docs/route-change-spans/ |
+ | bugsnag.browser.page.previous_route | stringValue | /docs/route-change-spans/ |
+ | bugsnag.browser.page.route_change.trigger | stringValue | popstate |
diff --git a/test/browser/features/server-responses.feature b/test/browser/features/server-responses.feature
index 9ff6fa054..c6f75b1bd 100644
--- a/test/browser/features/server-responses.feature
+++ b/test/browser/features/server-responses.feature
@@ -1,7 +1,7 @@
Feature: Server responses
Scenario: No Bugsnag-Sampling-Probability header
- Given I navigate to the test URL "/one-span-per-trace"
+ Given I navigate to the test URL "/docs/one-span-per-trace"
When I click the element "send-span"
And I wait to receive 1 trace
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "Span 1"
@@ -17,7 +17,7 @@ Feature: Server responses
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "Span 3"
Scenario: Bugsnag-Sampling-Probability header in response after 1 span
- Given I navigate to the test URL "/one-span-per-trace"
+ Given I navigate to the test URL "/docs/one-span-per-trace"
And I wait to receive a sampling request
When I set the sampling probability to "0.0"
And I click the element "send-span"
@@ -29,7 +29,7 @@ Feature: Server responses
Then I should receive no traces
Scenario: Bugsnag-Sampling-Probability header in response after 2 spans
- Given I navigate to the test URL "/one-span-per-trace"
+ Given I navigate to the test URL "/docs/one-span-per-trace"
And I wait to receive a sampling request
When I click the element "send-span"
And I wait to receive 1 trace
@@ -46,7 +46,7 @@ Feature: Server responses
Then I should receive no traces
Scenario: Bugsnag-Sampling-Probability value used for delivered spans
- Given I navigate to the test URL "/one-span-per-trace"
+ Given I navigate to the test URL "/docs/one-span-per-trace"
And I wait to receive a sampling request
When I set the sampling probability to "0.999999"
And I click the element "send-span"
diff --git a/test/browser/features/span-batching.feature b/test/browser/features/span-batching.feature
index 8a8b7369e..5214c8eab 100644
--- a/test/browser/features/span-batching.feature
+++ b/test/browser/features/span-batching.feature
@@ -1,12 +1,12 @@
Feature: Span batching
Scenario: Batch is successfully delivered after timeout
- Given I navigate to the test URL "/batch-timeout"
+ Given I navigate to the test URL "/docs/batch-timeout"
When I wait to receive 1 trace
Then a span name equals "Custom/Batch Timeout"
Scenario: Batch is successfully delivered after reaching max batch size
- Given I navigate to the test URL "/batch-max-limit"
+ Given I navigate to the test URL "/docs/batch-max-limit"
When I wait to receive 1 trace
Then a span name equals "Custom/Full Batch 1"
And a span name equals "Custom/Full Batch 2"
@@ -15,5 +15,5 @@ Feature: Span batching
And a span name equals "Custom/Full Batch 5"
Scenario: Empty batch is not delivered after timeout
- Given I navigate to the test URL "/empty-batch"
+ Given I navigate to the test URL "/docs/empty-batch"
Then I should have received no spans
diff --git a/test/browser/features/support/maze-config.rb b/test/browser/features/support/maze-config.rb
index bfd9a0856..a15b30b7b 100644
--- a/test/browser/features/support/maze-config.rb
+++ b/test/browser/features/support/maze-config.rb
@@ -5,27 +5,35 @@
$build_mode = BuildMode.new
$browser = Browser.new(Maze.config.browser)
-Maze.hooks.before_all do
- Maze.config.document_server_root = File.realpath("#{__dir__}/../fixtures/packages")
- Maze.config.enforce_bugsnag_integrity = false
+Maze.config.document_server_root = File.realpath("#{__dir__}/../fixtures/packages")
+Maze.config.enforce_bugsnag_integrity = false
- $logger.info("Running in #{$build_mode.mode_name} mode")
-end
-
-Maze.hooks.before do
- # Only needs running once, but the before_all hook gets invoked
- # before the public addresses are determined.
+def get_test_url()
if Maze.config.aws_public_ip
maze_address = Maze.public_address
- document_address = Maze.public_document_server_address
else
host = ENV.fetch('HOST', 'localhost')
- maze_address = "#{host}:#{Maze.config.port}"
- document_address = "#{host}:#{Maze.config.document_server_port}"
+ maze_address = "#{host}:9339"
+ end
+
+ if Maze.config.https
+ protocol = 'https'
+ else
+ protocol = 'http'
end
- $url_generator = UrlGenerator.new(
- URI("http://#{maze_address}"),
- URI("http://#{document_address}")
+ UrlGenerator.new(
+ URI("#{protocol}://#{maze_address}"),
+ URI("#{protocol}://#{maze_address}")
)
end
+
+Maze.hooks.before_all do
+ $logger.info("Running in #{$build_mode.mode_name} mode")
+end
+
+Maze.hooks.before do
+ # Only needs running once, but the before_all hook gets invoked
+ # before the public addresses are determined.
+ $url_generator = get_test_url()
+end
diff --git a/test/browser/features/trace-propagation.feature b/test/browser/features/trace-propagation.feature
index f534525e9..a696dc745 100644
--- a/test/browser/features/trace-propagation.feature
+++ b/test/browser/features/trace-propagation.feature
@@ -1,7 +1,7 @@
Feature: Trace propagation headers
Scenario: traceparent and tracestate header is added to xhr requests
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "xhr"
And I wait to receive a reflection
@@ -15,7 +15,7 @@ Feature: Trace propagation headers
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
Scenario: traceparent and tracestate header is added to fetch requests (simple headers in fetch options)
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "fetch-simple-headers-in-options"
And I wait to receive a reflection
@@ -29,7 +29,7 @@ Feature: Trace propagation headers
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
Scenario: traceparent and tracestate header is added to fetch requests (Headers class in fetch options)
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "fetch-headers-class-in-options"
And I wait to receive a reflection
@@ -43,7 +43,7 @@ Feature: Trace propagation headers
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
Scenario: traceparent and tracestate header is added to fetch requests (simple headers in Request object)
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "fetch-simple-headers-in-request"
And I wait to receive a reflection
@@ -57,7 +57,7 @@ Feature: Trace propagation headers
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
Scenario: traceparent and tracestate header is added to fetch requests (Headers class in Request object)
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "fetch-headers-class-in-request"
And I wait to receive a reflection
@@ -71,7 +71,7 @@ Feature: Trace propagation headers
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "[HTTP/GET]"
Scenario: traceparent header is added to fetch requests (headers in both request and options)
- Given I navigate to the test URL "/trace-propagation"
+ Given I navigate to the test URL "/docs/trace-propagation"
When I click the element "fetch-headers-in-request-and-options"
And I wait to receive a reflection
diff --git a/test/browser/features/vue-router.feature b/test/browser/features/vue-router.feature
index c6ec4a37c..3f1dced94 100644
--- a/test/browser/features/vue-router.feature
+++ b/test/browser/features/vue-router.feature
@@ -1,7 +1,7 @@
Feature: Vue router
Scenario: Vue route change spans are automatically instrumented
- Given I navigate to the test URL "/vue-router"
+ Given I navigate to the test URL "/docs/vue-router"
And I click the element "contact"
And I click the element "profile"
When I wait to receive 2 spans
diff --git a/test/react-native/features/traceparent.feature b/test/react-native/features/traceparent.feature
index e16ce74e8..efa0075bf 100644
--- a/test/react-native/features/traceparent.feature
+++ b/test/react-native/features/traceparent.feature
@@ -6,7 +6,7 @@ Feature: Trace propagation headers
And I wait to receive 5 reflections
And I wait for 5 spans
- Then every span string attribute "http.url" matches the regex "^http:\/\/.+:\d{4}\/reflect$"
+ Then every span string attribute "http.url" matches the regex "^http(s)?:\/\/.+:\d{4}\/reflect$"
And the reflection request method equals "GET"
And the reflection "X-Test-Header" header equals "test"