Skip to content

Commit d88f155

Browse files
committed
Reinstate other browser configs
Also attempt to fix build & reports by building on test & running report generator.
1 parent 7519e04 commit d88f155

3 files changed

Lines changed: 59 additions & 30 deletions

File tree

.github/workflows/crossBrowserTesting.yml

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
# Summary:
1818
#
1919
# * Installs and configures the environment
20-
# * Builds the solution in Debug configuration
20+
# * Builds the solution in Release configuration
2121
# * Runs just the Selenium tests
22-
# * In Debug configuration (.NET tests)
23-
# * Using the BrowserStack browser configuration
22+
# * In Release configuration (.NET tests)
23+
# * Using the BrowserStack SDK
2424

2525
browser_tests:
2626

@@ -29,13 +29,41 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
include:
32-
- browserStackConfig: chromeLatest
33-
# - browserStackConfig: chromeOld
34-
# - browserStackConfig: edgeLatest
35-
# - browserStackConfig: firefoxLatest
36-
# - browserStackConfig: firefoxOld
37-
# - browserStackConfig: safari17
38-
# - browserStackConfig: safari26
32+
- browserName: Chrome
33+
browserVersion: latest-50
34+
os: Windows
35+
osVersion: 11
36+
configName: Chrome_legacy
37+
- browserName: Chrome
38+
browserVersion: latest
39+
os: Windows
40+
osVersion: 11
41+
configName: Chrome_latest
42+
- browserName: Edge
43+
browserVersion: latest
44+
os: Windows
45+
osVersion: 11
46+
configName: Edge_latest
47+
- browserName: Firefox
48+
browserVersion: latest
49+
os: Windows
50+
osVersion: 11
51+
configName: Firefox_latest
52+
- browserName: Firefox
53+
browserVersion: latest-40
54+
os: Windows
55+
osVersion: 11
56+
configName: Firefox_legacy
57+
- browserName: Safari
58+
browserVersion: 17.3
59+
os: OS X
60+
osVersion: Sonoma
61+
configName: Safari_17
62+
- browserName: Safari
63+
browserVersion: 26.2
64+
os: OS X
65+
osVersion: Tahoe
66+
configName: Safari_26
3967

4068
name: Run tests
4169
runs-on: ubuntu-24.04
@@ -49,8 +77,12 @@ jobs:
4977
DotnetVersion: 8.0.x
5078
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
5179
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
52-
BROWSERSTACK_BUILD_IDENTIFIER: gh-actions-cbt.${{ github.run_number }}.${{ github.run_attempt }}
53-
80+
BROWSERSTACK_BUILD_IDENTIFIER: cbt.${{ matrix.configName }}.${{ github.run_number }}.${{ github.run_attempt }}
81+
BS_BROWSER_NAME: ${{ matrix.browserName }}
82+
BS_BROWSER_VERSION: ${{ matrix.browserVersion }}
83+
BS_OS: ${{ matrix.os }}
84+
BS_OS_VERSION: ${{ matrix.osVersion }}
85+
5486
steps:
5587
- name: Checkout
5688
uses: actions/checkout@v4
@@ -69,7 +101,6 @@ jobs:
69101

70102
- name: Activate BrowserStack
71103
run: |
72-
cp Tests/CSF.Screenplay.Selenium.Tests/Tools/browserstack.${{ matrix.browserStackConfig }}.yml Tests/CSF.Screenplay.Selenium.Tests/browserstack.yml
73104
cp Tests/CSF.Screenplay.Selenium.Tests/Tools/BrowserStack.props Tests/CSF.Screenplay.Selenium.Tests/BrowserStack.props
74105
75106
- name: Force .NET 8 with global.json
@@ -85,18 +116,16 @@ jobs:
85116

86117
# Build and test the solution
87118

88-
- name: Build the solution
89-
run: dotnet build -c ${{ env.Configuration }}
90119
- name: Run .NET Selenium tests only
91120
id: dotnet_tests
92-
run: dotnet test -c ${{ env.Configuration }} --no-build --filter TestCategory=WebDriver Tests/CSF.Screenplay.Selenium.Tests
121+
run: dotnet test -c ${{ env.Configuration }} --filter TestCategory=WebDriver Tests/CSF.Screenplay.Selenium.Tests
93122
continue-on-error: true
94123

95124
# Post-test tasks (artifacts, overall status)
96125
- name: Upload Screenplay JSON report artifact
97126
uses: actions/upload-artifact@v4
98127
with:
99-
name: Screenplay JSON reports ${{ matrix.browserStackConfig }}
128+
name: Screenplay JSON reports ${{ matrix.configName }}
100129
path: Tests/CSF.Screenplay.Selenium.Tests/**/ScreenplayReport_*.json
101130
- name: Convert Screenplay reports to HTML
102131
continue-on-error: true
@@ -105,12 +134,12 @@ jobs:
105134
do
106135
reportDir=$(dirname "$report")
107136
outputFile="$reportDir/ScreenplayReport.html"
108-
dotnet run --no-build --framework $Tfm -c ${{ env.Configuration }} --project CSF.Screenplay.JsonToHtmlReport --ReportPath "$report" --OutputPath "$outputFile"
137+
dotnet run --framework $Tfm -c ${{ env.Configuration }} --project CSF.Screenplay.JsonToHtmlReport --ReportPath "$report" --OutputPath "$outputFile"
109138
done
110139
- name: Upload Screenplay HTML report artifact
111140
uses: actions/upload-artifact@v4
112141
with:
113-
name: Screenplay HTML reports ${{ matrix.browserStackConfig }}
142+
name: Screenplay HTML reports ${{ matrix.configName }}
114143
path: Tests/**/ScreenplayReport.html
115144
- name: Fail the build if any test failures
116145
if: steps.dotnet_tests.outcome == 'failure'

Tests/CSF.Screenplay.Selenium.Tests/Tools/browserstack.chromeLatest.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
platforms:
2+
- browserName: ${BS_BROWSER_NAME}
3+
browserVersion: ${BS_BROWSER_VERSION}
4+
os: ${BS_OS}
5+
osVersion: ${BS_OS_VERSION}
6+
parallelsPerPlatform: 5
7+
browserstackLocal: true
8+
buildName: ${BROWSERSTACK_BUILD_IDENTIFIER}
9+
projectName: CSF.Screenplay
10+
video: true
11+
testObservability: true

0 commit comments

Comments
 (0)