|
1 | 1 | # Sanity workflow that verifies the NUnit + Playwright BrowserStack SDK sample |
2 | 2 | # against a full commit id, mirroring browserstack/xunit-reqnroll-playwright-browserstack. |
3 | | -# Two test runs: |
4 | | -# 1. Public bstackdemo scenario (browserstackLocal: false in yml). |
5 | | -# 2. BrowserStack Local scenario (yml flipped to true; a python http.server |
| 3 | +# Two test runs (yml ships with browserstackLocal: true; both runs benefit from it): |
| 4 | +# 1. Public bstackdemo scenario (Category=sample-test). |
| 5 | +# 2. BrowserStack Local scenario (Category=sample-local-test) — a python http.server |
6 | 6 | # hosts a tiny title-matching page on port 45454, the SDK starts the tunnel, |
7 | | -# and the test asserts that the cloud browser sees that page through bs-local.com). |
| 7 | +# and the test asserts that the cloud browser sees that page through bs-local.com. |
8 | 8 |
|
9 | 9 | name: NUnit Playwright SDK sanity workflow on workflow_dispatch |
10 | 10 |
|
|
76 | 76 |
|
77 | 77 | - name: Run sample tests (public bstackdemo) |
78 | 78 | working-directory: NunitPlaywrightBrowserstack.Tests |
79 | | - run: dotnet test --filter "FullyQualifiedName~BStackDemoCart" |
| 79 | + run: dotnet test --filter "Category=sample-test" |
80 | 80 |
|
81 | 81 | - name: Run local tests (BrowserStack Local + python http.server harness) |
82 | 82 | shell: bash |
|
94 | 94 | HTTP_PID=$! |
95 | 95 | trap 'kill "$HTTP_PID" 2>/dev/null || true' EXIT |
96 | 96 | sleep 2 |
97 | | - # 2. Flip the SDK Local toggle so the SDK starts/stops the tunnel. |
98 | | - sed -i.bak 's/^browserstackLocal: false/browserstackLocal: true/' browserstack.yml && rm -f browserstack.yml.bak |
99 | | - # 3. Run only the local scenario; cloud browser reaches the harness through bs-local.com. |
100 | | - dotnet test --filter "FullyQualifiedName~BStackLocalSample" |
| 97 | + # 2. Run only the local scenario; cloud browser reaches the harness through bs-local.com (browserstackLocal:true ships as default). |
| 98 | + dotnet test --filter "Category=sample-local-test" |
101 | 99 |
|
102 | 100 | - if: always() |
103 | 101 | uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 |
|
0 commit comments