Class: ODataTraceReporter
Defined in: src/reporters/odata-trace-reporter.ts:244
Aggregates OData request trace data from Playwright test attachments.
Remarks
Attach OData trace data in tests using testInfo.attach('odata-trace', ...),
and this reporter will collect and aggregate the data into a JSON report.
Example
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['./src/reporters/odata-trace-reporter.ts', { outputDir: 'reports' }],
],
});
Implements
Reporter
Constructors
Constructor
new ODataTraceReporter(
options?):ODataTraceReporter
Defined in: src/reporters/odata-trace-reporter.ts:248
Parameters
options?
Returns
ODataTraceReporter
Methods
onEnd()
onEnd(
_result):Promise<void>
Defined in: src/reporters/odata-trace-reporter.ts:289
Writes the aggregated OData trace report to odata-trace.json.
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
Defined in: src/reporters/odata-trace-reporter.ts:263
Collects OData trace entries from test result 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
Defined in: src/reporters/odata-trace-reporter.ts:362
Indicates this reporter does not write to stdout/stderr.
Returns
boolean
Always false.
Example
reporter.printsToStdio(); // false
Implementation of
Reporter.printsToStdio