You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables to allow the plugin to report your results to Sauce Labs. Your Sauce Labs Username and Access Key are available from your [dashboard](https://app.saucelabs.com/user-settings).
19
15
20
16
## Usage
21
17
22
-
Add to default reporter:
23
-
```
24
-
npx playwright test --reporter=line,@saucelabs/playwright-reporter
18
+
Add to the default reporter:
19
+
```sh
20
+
npx playwright test --reporter=line,@saucelabs/playwright-reporter
25
21
```
26
22
27
23
Use only `@saucelabs/playwright-reporter`:
28
-
```
29
-
npx playwright test --reporter=@saucelabs/playwright-reporter
24
+
```sh
25
+
npx playwright test --reporter=@saucelabs/playwright-reporter
30
26
```
31
27
32
-
You can also configure using `playwright.config.js`. To achieve that, add `'@saucelabs/playwright-reporter'` to the reporter section of your configuration:
33
-
```
28
+
You can also configure it using `playwright.config.js`. To do that, add `'@saucelabs/playwright-reporter'` to the reporter section of your configuration:
29
+
```js
34
30
constconfig= {
35
31
reporter: [
36
32
['@saucelabs/playwright-reporter'],
@@ -39,12 +35,12 @@ const config = {
39
35
};
40
36
```
41
37
42
-
### Plugin configuration
38
+
### Plugin Configuration
43
39
44
-
`@saucelabs/playwright-plugin` is configurable through your `playwright.config.js` or `playwright.config.ts` file.
40
+
`@saucelabs/playwright-reporter` is configurable through your `playwright.config.js` or `playwright.config.ts` file.
|`buildName`| Sets a build ID. <br> Default: `''`|`string`|
62
+
|`tags`| Tags to add to the uploaded Sauce job. <br> Default: `[]`|`string[]`|
63
+
|`region`| Sets the region. <br> Default: `us-west-1`|`us-west-1`\|`eu-central-1`|
64
+
|`upload`| Whether to upload report and assets to Sauce Labs. <br> Default: `true`|`boolean`|
65
+
|`outputFile`| The local path to write the Sauce test report. Can be set in env var `SAUCE_REPORT_OUTPUT_NAME`. |`string`|
70
66
71
67
## Limitations
72
68
73
-
Some limitations applies to `@saucelabs/playwright-reporter`:
74
-
*Before playwright@v1.16.3, Playwright version is not reported to Sauce Labs.
75
-
*Browser version is not reported to Sauce Labs.
69
+
Some limitations apply to `@saucelabs/playwright-reporter`:
70
+
*For Playwright versions before v1.16.3, the Playwright version is not reported to Sauce Labs.
71
+
*The browser version is not reported to Sauce Labs.
76
72
77
73
## Development
78
74
79
-
### Running locally
75
+
### Running Locally
80
76
81
-
In order to test the reporter, you'll need to link it to itself then run a test with the reporter set.
77
+
To test the reporter locally, link it to itself and then run a test with the reporter set.
82
78
83
-
```
79
+
```sh
84
80
$ npm link
85
81
$ npm link @saucelabs/playwright-reporter
86
82
$ npx playwright test --reporter=@saucelabs/playwright-reporter
87
83
```
88
84
89
85
### Debug
90
86
91
-
Once you `npm link`, you can run your playwright tests with the environment variable `DEBUG="@saucelabs/playwright-reporter:*"` to see additional debug output.
87
+
After linking with `npm link`, you can run your Playwright tests with the environment variable `DEBUG="@saucelabs/playwright-reporter:*"` to see additional debug output.
88
+
89
+
```sh
90
+
$ DEBUG="@saucelabs/playwright-reporter:*" npx playwright test --reporter=@saucelabs/playwright-reporter
0 commit comments