Skip to content

Commit c2cca37

Browse files
authored
Update how-to-manage-authentication.md
1 parent 0dd64a6 commit c2cca37

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

articles/app-testing/playwright-workspaces/how-to-manage-authentication.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,20 @@ To enable authentication using access tokens:
5555

5656
::: zone pivot="playwright-test-runner"
5757

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.
5959

60-
While running the tests, enable access token auth in the `playwright.service.config.ts` file in your setup.
61-
62-
```typescript
60+
```typescript
6361
import { getServiceConfig, ServiceAuth } from '@azure/playwright';
6462

6563
/* 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, {
6765
serviceAuthType: ServiceAuth.ACCESS_TOKEN
6866
}));
69-
```
67+
```
7068
::: zone-end
7169

7270
::: zone pivot="nunit-test-runner"
7371

74-
### If you're using the **NUnit Test Runner**
75-
7672
1. While running the tests, enable access token auth in the setup file.
7773

7874
```c#
@@ -109,8 +105,6 @@ While running the tests, enable access token auth in the `playwright.service.con
109105

110106
## Set up your environment.
111107

112-
### If you're using the **Playwright Test Runner**
113-
114108
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.
115109

116110
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 `
133127

134128
::: zone pivot="nunit-test-runner"
135129

136-
### If you're using the **NUnit Test Runner**
137-
138130
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.
139131

140132
::: zone-end
@@ -145,15 +137,13 @@ Run Playwright tests against cloud-hosted browsers and publish the results to th
145137

146138
::: zone pivot="playwright-test-runner"
147139

148-
### If you're using the **Playwright Test Runner**
149140
```typescript
150141
npx playwright test --config=playwright.service.config.ts --workers=20
151142
```
152143
::: zone-end
153144

154145
::: zone pivot="nunit-test-runner"
155146

156-
### If you're using the **NUnit Test Runner**
157147
```bash
158148
dotnet test -- NUnit.NumberOfTestWorkers=20
159149
```

0 commit comments

Comments
 (0)