@@ -55,24 +55,20 @@ To enable authentication using access tokens:
55
55
56
56
::: zone pivot="playwright-test-runner"
57
57
58
- ### If you're using the ** Playwright Test Runner **
58
+ 1 . While running the tests, enable access token auth in the ` playwright.service.config.ts ` file in your setup.
59
59
60
- While running the tests, enable access token auth in the ` playwright.service.config.ts ` file in your setup.
61
-
62
- ``` typescript
60
+ ``` typescript
63
61
import { getServiceConfig , ServiceAuth } from ' @azure/playwright' ;
64
62
65
63
/* Learn more about service configuration at https://aka.ms/mpt/config */
66
- export default defineConfig (config , getServiceConfig ( config {
64
+ export default defineConfig (config , getServiceConfig ( config , {
67
65
serviceAuthType: ServiceAuth .ACCESS_TOKEN
68
66
}));
69
- ```
67
+ ```
70
68
::: zone - end
71
69
72
70
::: zone pivot = " nunit-test-runner"
73
71
74
- ### If you're using the ** NUnit Test Runner**
75
-
76
72
1. While running the tests , enable access token auth in the setup file .
77
73
78
74
` ` ` c#
@@ -109,8 +105,6 @@ While running the tests, enable access token auth in the `playwright.service.con
109
105
110
106
## Set up your environment .
111
107
112
- ### If you're using the **Playwright Test Runner**
113
-
114
108
To set up your environment , configure the ` PLAYWRIGHT_SERVICE_ACCESS_TOKEN ` environment variable with the value you obtained in the previous steps . Ensure this environment variable is available in your setup where you are running tests .
115
109
116
110
We recommend that you use the ` dotenv ` module to manage your environment . With ` dotenv ` , you define your environment variables in the ` .env ` file .
@@ -133,8 +127,6 @@ We recommend that you use the `dotenv` module to manage your environment. With `
133
127
134
128
::: zone pivot = " nunit-test-runner"
135
129
136
- ### If you're using the **NUnit Test Runner**
137
-
138
130
To set up your environment , configure the ` PLAYWRIGHT_SERVICE_ACCESS_TOKEN ` environment variable with the value you obtained in the previous steps . Ensure this environment variable is available in your setup where you are running tests .
139
131
140
132
::: zone - end
@@ -145,15 +137,13 @@ Run Playwright tests against cloud-hosted browsers and publish the results to th
145
137
146
138
::: zone pivot = " playwright-test-runner"
147
139
148
- ### If you 're using the **Playwright Test Runner **
149
140
` ` ` typescript
150
141
npx playwright test --config=playwright.service.config.ts --workers=20
151
142
` ` `
152
143
::: zone - end
153
144
154
145
::: zone pivot = " nunit-test-runner"
155
146
156
- ### If you 're using the **NUnit Test Runner **
157
147
` ` ` bash
158
148
dotnet test -- NUnit.NumberOfTestWorkers=20
159
149
` ` `
0 commit comments