Address comments
This commit is contained in:
parent
859240b158
commit
326828c985
|
|
@ -87,6 +87,15 @@ and [`method: Reporter.onError`] is called when something went wrong outside of
|
||||||
|
|
||||||
If your custom reporter does not print anything to the terminal, implement [`method: Reporter.printsToStdio`] and return `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter to enhance user experience.
|
If your custom reporter does not print anything to the terminal, implement [`method: Reporter.printsToStdio`] and return `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter to enhance user experience.
|
||||||
|
|
||||||
|
**Merged report API notes**
|
||||||
|
|
||||||
|
When merging mutliple [`blob`](./test-reporters#blob-reporter) reports via [`merge-reports`](./test-sharding#merge-reports-cli) CLI
|
||||||
|
command, the same [Reporter] API is called to produce final reports and all existing reporters
|
||||||
|
should work without any changes. There some subtle differences though which might affect some custom
|
||||||
|
reporters.
|
||||||
|
|
||||||
|
* Projects from different shards are always kept as separate [TestProject] objects. E.g. if project 'Desktop Chrome' was sharded across 5 machines then there will be 5 instances of projects with the same name in the config passed to [`method: Reporter.onBegin`].
|
||||||
|
|
||||||
## optional method: Reporter.onBegin
|
## optional method: Reporter.onBegin
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -349,19 +349,6 @@ Or just pass the reporter file path as `--reporter` command line option:
|
||||||
npx playwright test --reporter="./myreporter/my-awesome-reporter.ts"
|
npx playwright test --reporter="./myreporter/my-awesome-reporter.ts"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Merged report API notes
|
|
||||||
|
|
||||||
When merging mutliple [`blob`](./test-reporters#blob-reporter) reports via [`merge-reports`](./test-sharding#merge-reports-cli) CLI
|
|
||||||
command, the same [Reporter] API is called to produce final reports and all existing reporters
|
|
||||||
should work without any changes. There some subtle differences though which might affect some custom
|
|
||||||
reporters.
|
|
||||||
|
|
||||||
**Merging projects**
|
|
||||||
|
|
||||||
Projects from different shards are always kept as separate [TestProject] objects. E.g. if project
|
|
||||||
'Desktop Chrome' was sharded across 5 machines then there will be 5 instances of projects with the
|
|
||||||
same name in the config passed to [`method: Reporter.onBegin`].
|
|
||||||
|
|
||||||
## Third party reporter showcase
|
## Third party reporter showcase
|
||||||
|
|
||||||
* [Allure](https://www.npmjs.com/package/allure-playwright)
|
* [Allure](https://www.npmjs.com/package/allure-playwright)
|
||||||
|
|
|
||||||
11
packages/playwright/types/testReporter.d.ts
vendored
11
packages/playwright/types/testReporter.d.ts
vendored
|
|
@ -441,6 +441,17 @@ export interface FullResult {
|
||||||
* [reporter.printsToStdio()](https://playwright.dev/docs/api/class-reporter#reporter-prints-to-stdio) and return
|
* [reporter.printsToStdio()](https://playwright.dev/docs/api/class-reporter#reporter-prints-to-stdio) and return
|
||||||
* `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter
|
* `false`. This way, Playwright will use one of the standard terminal reporters in addition to your custom reporter
|
||||||
* to enhance user experience.
|
* to enhance user experience.
|
||||||
|
*
|
||||||
|
* **Merged report API notes**
|
||||||
|
*
|
||||||
|
* When merging mutliple [`blob`](https://playwright.dev/docs/api/test-reporters#blob-reporter) reports via
|
||||||
|
* [`merge-reports`](https://playwright.dev/docs/api/test-sharding#merge-reports-cli) CLI command, the same {@link Reporter} API is called to
|
||||||
|
* produce final reports and all existing reporters should work without any changes. There some subtle differences
|
||||||
|
* though which might affect some custom reporters.
|
||||||
|
* - Projects from different shards are always kept as separate {@link TestProject} objects. E.g. if project
|
||||||
|
* 'Desktop Chrome' was sharded across 5 machines then there will be 5 instances of projects with the same name in
|
||||||
|
* the config passed to
|
||||||
|
* [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin).
|
||||||
*/
|
*/
|
||||||
export interface Reporter {
|
export interface Reporter {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue