Class: ControlTreeReporter
Aggregates UI5 control tree snapshots from failed test attachments and generates JSON and HTML reports.
Remarks
In onTestEnd(), the reporter reads attachments named 'ui5-control-tree' with
application/json content type from failed tests only. In onEnd(), it writes:
control-tree-report.json— raw collected datacontrol-tree-report.html— standalone collapsible tree viewer
Example
// playwright.config.ts
export default defineConfig({
reporter: [
['playwright-praman/reporters', { outputDir: 'reports' }],
],
});
Implements
Reporter
Constructors
Constructor
new ControlTreeReporter(
options?):ControlTreeReporter
Parameters
options?
Returns
ControlTreeReporter
Methods
onEnd()
onEnd(
_result):Promise<void>
Writes the control tree report files (JSON + HTML).
Parameters
_result
FullResult
The full test run result (unused).
Returns
Promise<void>
Example
await reporter.onEnd(fullResult);
Implementation of
Reporter.onEnd
onTestEnd()
onTestEnd(
test,result):void
Collects control tree snapshots from failed test attachments.
Parameters
test
TestCase
The completed test case.
result
TestResult
The test result containing attachments.
Returns
void
Example
reporter.onTestEnd(testCase, testResult);
Implementation of
Reporter.onTestEnd
printsToStdio()
printsToStdio():
boolean
Indicates this reporter does not write to stdout/stderr.
Returns
boolean
Always false.
Example
reporter.printsToStdio(); // false
Implementation of
Reporter.printsToStdio