Skip to content

Commit 2616f4e

Browse files
committed
Add temporary atomic debug reporter
1 parent ecfe6c3 commit 2616f4e

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

tests/e2e-pw/atomic-debug-reporter.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* eslint-disable no-console */
2+
/**
3+
* External dependencies
4+
*/
5+
import type {
6+
FullConfig,
7+
FullResult,
8+
Reporter,
9+
Suite,
10+
TestCase,
11+
TestResult,
12+
} from '@playwright/test/reporter';
13+
14+
class AtomicDebugReporter implements Reporter {
15+
onBegin( config: FullConfig, suite: Suite ) {
16+
console.log(
17+
`Starting the run with ${ suite.allTests().length } tests`
18+
);
19+
}
20+
21+
onTestBegin( test: TestCase ) {
22+
console.log( `Starting test ${ test.title }` );
23+
}
24+
25+
onTestEnd( test: TestCase, result: TestResult ) {
26+
console.log( `Finished test ${ test.title }: ${ result.status }` );
27+
}
28+
29+
onEnd( result: FullResult ) {
30+
console.log( `Finished the run: ${ result.status }` );
31+
}
32+
}
33+
34+
export default AtomicDebugReporter;

tests/e2e-pw/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default defineConfig( {
6262
[ 'github' ],
6363
[ 'json', { outputFile: 'results.json' } ],
6464
[ 'html' ],
65+
[ './atomic-debug-reporter.ts' ],
6566
]
6667
: [ [ 'html', { open: 'never' } ] ],
6768
outputDir: './test-results',

0 commit comments

Comments
 (0)