| 145 | * [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin). |
| 146 | */ |
| 147 | export interface Reporter { |
| 148 | /** |
| 149 | * Called after all tests have been run, or testing has been interrupted. Note that this method may return a [Promise] |
| 150 | * and Playwright Test will await it. Reporter is allowed to override the status and hence affect the exit code of the |
| 151 | * test runner. |
| 152 | * @param result Result of the full test run, `status` can be one of: |
| 153 | * - `'passed'` - Everything went as expected. |
| 154 | * - `'failed'` - Any test has failed. |
| 155 | * - `'timedout'` - The |
| 156 | * [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout) has |
| 157 | * been reached. |
| 158 | * - `'interrupted'` - Interrupted by the user. |
| 159 | */ |
| 160 | onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void; |
| 161 | /** |
| 162 | * Called once before running tests. All tests have been already discovered and put into a hierarchy of |
| 163 | * [Suite](https://playwright.dev/docs/api/class-suite)s. |
| 164 | * @param config Resolved configuration. |
| 165 | * @param suite The root suite that contains all projects, files and test cases. |
| 166 | */ |
| 167 | onBegin?(config: FullConfig, suite: Suite): void; |
| 168 | |
| 169 | /** |
| 170 | * Called on some global error, for example unhandled exception in the worker process. |
| 171 | * @param error The error. |
| 172 | * @param workerInfo Contains information about the worker that produced this error. `undefined` for errors that are not associated with |
| 173 | * a specific worker. |
| 174 | */ |
| 175 | onError?(error: TestError, workerInfo?: WorkerInfo): void; |
| 176 | |
| 177 | /** |
| 178 | * Called immediately before test runner exists. At this point all the reporters have received the |
| 179 | * [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) signal, so all the reports |
| 180 | * should be build. You can run the code that uploads the reports in this hook. |
| 181 | */ |
| 182 | onExit?(): Promise<void>; |
| 183 | |
| 184 | /** |
| 185 | * Called when something has been written to the standard error in the worker process. |
| 186 | * @param chunk Output chunk. |
| 187 | * @param test Test that was running. Note that output may happen when no test is running, in which case this will be [void]. |
| 188 | * @param result Result of the test run, this object gets populated while the test runs. |
| 189 | */ |
| 190 | onStdErr?(chunk: string|Buffer, test: void|TestCase, result: void|TestResult): void; |
| 191 | |
| 192 | /** |
| 193 | * Called when something has been written to the standard output in the worker process. |
| 194 | * @param chunk Output chunk. |
| 195 | * @param test Test that was running. Note that output may happen when no test is running, in which case this will be [void]. |
| 196 | * @param result Result of the test run, this object gets populated while the test runs. |
| 197 | */ |
| 198 | onStdOut?(chunk: string|Buffer, test: void|TestCase, result: void|TestResult): void; |
| 199 | |
| 200 | /** |
| 201 | * Called when a test step started in the worker process. |
| 202 | * @param test Test that the step belongs to. |
| 203 | * @param result Result of the test run, this object gets populated while the test runs. |
| 204 | * @param step Test step instance that has started. |
no outgoing calls
no test coverage detected
searching dependent graphs…