Skip to content

Commit bfb189a

Browse files
authored
Merge pull request #533 from bugsnag/https
run e2e tests over https
2 parents 8aa66d1 + 46206c0 commit bfb189a

35 files changed

+189
-279
lines changed

.buildkite/browser-pipeline.full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ steps:
2929
run: browser-maze-runner-bs
3030
use-aliases: true
3131
command:
32+
- --https
3233
- --farm=bs
3334
- --browser={{ matrix }}
3435
artifacts#v1.5.0:

.buildkite/browser-pipeline.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ steps:
4646
use-aliases: true
4747
service-ports: true
4848
command:
49+
- --https
4950
- --farm=bb
5051
- --browser={{ matrix.browser }}_{{ matrix.version }}
5152
- --appium-version=1.22
@@ -78,6 +79,7 @@ steps:
7879
run: browser-maze-runner-legacy
7980
use-aliases: true
8081
command:
82+
- --https
8183
- --farm=bs
8284
- --browser={{ matrix.browser }}_{{ matrix.version }}
8385
artifacts#v1.5.0:
@@ -97,5 +99,31 @@ steps:
9799
adjustments:
98100
- with: { browser: firefox, version: 60 }
99101
- with: { browser: edge, version: 80 }
100-
- with: { browser: safari, version: 11 }
101102
- with: { browser: edge, version: latest }
103+
104+
# BrowserStack non-https
105+
- label: ":browserstack: :{{ matrix.browser }}: {{ matrix.version }} Browser non-https tests${EXTRA_STEP_LABEL}"
106+
depends_on: "browser-maze-runner-legacy-${USE_CDN_BUILD}"
107+
timeout_in_minutes: 30
108+
plugins:
109+
docker-compose#v4.12.0:
110+
pull: browser-maze-runner-legacy
111+
run: browser-maze-runner-legacy
112+
use-aliases: true
113+
command:
114+
- --farm=bs
115+
- --browser={{ matrix.browser }}_{{ matrix.version }}
116+
artifacts#v1.5.0:
117+
upload:
118+
- "./test/browser/maze_output/failed/**/*"
119+
test-collector#v1.10.2:
120+
files: "reports/TEST-*.xml"
121+
format: "junit"
122+
branch: "^main|next$$"
123+
api-token-env-name: "BROWSER_PERFORMANCE_BUILDKITE_ANALYTICS_TOKEN"
124+
concurrency: 2
125+
concurrency_group: "browserstack"
126+
matrix:
127+
setup:
128+
browser: [safari]
129+
version: [11]

test/browser/Gemfile.lock

Lines changed: 0 additions & 128 deletions
This file was deleted.

test/browser/TESTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ brew install chromedriver
1111
To run all the tests, run the following in `test/browser`:
1212

1313
```sh
14-
bundle exec maze-runner --farm=local --browser=chrome
14+
bundle exec maze-runner --https --farm=local --browser=chrome
1515
```
1616

1717
Or to run a single feature file:
1818

1919
```sh
20-
bundle exec maze-runner --farm=local --browser=chrome features/device.feature
20+
bundle exec maze-runner --https --farm=local --browser=chrome features/device.feature
2121
```
2222

2323
## 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
3434
To run all the tests, run the following in `test/browser`:
3535

3636
```sh
37-
bundle exec maze-runner --farm=bs --browser=chrome_latest
37+
bundle exec maze-runner --https --farm=bs --browser=chrome_latest
3838
```
3939

4040
Or to run a single feature file:
4141

4242
```sh
43-
bundle exec maze-runner --farm=bs --browser=chrome_latest features/manual-spans.feature
43+
bundle exec maze-runner --https --farm=bs --browser=chrome_latest features/manual-spans.feature
4444
```

test/browser/features/angular.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Feature: Angular
66

77
Scenario: Angular route change spans are automatically instrumented
8-
Given I navigate to the test URL "/angular/dist"
8+
Given I navigate to the test URL "/docs/angular/dist"
99
And the element "customers" is present
1010
And I click the element "customers"
1111
When I wait to receive 1 trace
@@ -25,7 +25,7 @@ Feature: Angular
2525
| bugsnag.browser.page.route_change.trigger | stringValue | imperative |
2626

2727
Scenario: Route with a custom URL matcher
28-
Given I navigate to the test URL "/angular/dist"
28+
Given I navigate to the test URL "/docs/angular/dist"
2929
And the element "customMatching" is present
3030
And I click the element "customMatching"
3131
When I wait to receive 1 trace

test/browser/features/custom-attributes.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Feature: Custom attributes
22

33
Scenario: Custom attributes can be added to spans
4-
Given I navigate to the test URL "/custom-attributes"
4+
Given I navigate to the test URL "/docs/custom-attributes"
55
And I wait for 1 span
66

77
Then a span named "Custom/CustomAttributesScenario" contains the attributes:

test/browser/features/device-id.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ Feature: Device ID persistence
22

33
Scenario: persisted device ID is used if present
44
# load the page and persist an ID
5-
Given I navigate to the test URL "/retry-scenario"
5+
Given I navigate to the test URL "/docs/retry-scenario"
66
And I wait to receive a sampling request
77
And I store the device ID "c1234567890abcdefghijklmnop"
88

99
# reload the page to prove the ID was persisted and not just available in
1010
# memory somehow
11-
When I navigate to the test URL "/retry-scenario"
11+
When I navigate to the test URL "/docs/retry-scenario"
1212
And I wait to receive a sampling request
1313
And I click the element "send-first-span"
1414
And I wait for 1 span
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Feature: Configuration
22

33
Scenario: Delivery is prevented when releaseStage is not in enabledReleaseStages
4-
Given I navigate to the test URL "/enabled-release-stages-disabled"
4+
Given I navigate to the test URL "/docs/enabled-release-stages-disabled"
55
Then I should receive no traces
66

77
Scenario: Delivery is allowed when releaseStage is present in enabledReleaseStages
8-
Given I navigate to the test URL "/enabled-release-stages"
8+
Given I navigate to the test URL "/docs/enabled-release-stages"
99
And I wait to receive at least 1 trace
1010
Then the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "Custom/Should send"
1111
And the trace payload field "resourceSpans.0.resource" string attribute "deployment.environment" equals "test"

test/browser/features/error-correlation.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Feature: Error Correlation
22

33
Scenario: Error does not include the correlation property when no spans are open
4-
Given I navigate to the test URL "/error-correlation"
4+
Given I navigate to the test URL "/docs/error-correlation"
55
And I wait to receive a sampling request
66
And I click the element "send-error"
77
And I wait to receive an error
88
Then the error is a valid browser payload for the error reporting API
99
And the error payload field "events.0.correlation" is null
1010

1111
Scenario: Reported errors include the current trace and span id
12-
Given I navigate to the test URL "/error-correlation"
12+
Given I navigate to the test URL "/docs/error-correlation"
1313
And I wait to receive a sampling request
1414
Then I click the element "start-span"
1515
And I wait for 1 second
@@ -33,7 +33,7 @@ Feature: Error Correlation
3333
And the error payload field "events.0.correlation.traceId" equals the stored value "traceId"
3434

3535
Scenario: Reported errors do not include the trace and span id if the span is not the current context
36-
Given I navigate to the test URL "/error-correlation"
36+
Given I navigate to the test URL "/docs/error-correlation"
3737
And I wait to receive a sampling request
3838
Then I click the element "start-span"
3939
And I wait for 1 second

test/browser/features/fixed-sampling-probability.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Feature: Fixed Sampling Probability
22

33
Scenario: Uses configured sampling probability
4-
Given I navigate to the test URL "/fixed-sampling-probability"
4+
Given I navigate to the test URL "/docs/fixed-sampling-probability"
55
And I enter unmanaged traces mode
66
When I click the element "send-span"
77
And I wait to receive 1 trace

0 commit comments

Comments
 (0)