-
Notifications
You must be signed in to change notification settings - Fork 260
Description
🚀 Feature Request
While reviewing the playwright trace viewer documentation, I observed that retry based trace recording options such as on-first-retry, on-all-retries, retain-on-failures are available in Playwright Typescript, but are not supported in Playwright Java.
In playwright Typescript, trace recording can be configured directly in playwright.config.ts, allowing fine-grained control over when traces are captured, especially during CI executions.
These options help reduce unnecessary trace generation.
**Expected Behavior: **
Playwright Java should provide retry-based trace recording options comparable to Playwright Typescript, enabling.
Trace capture only on the first retry.
Trace capture on all retries
Trace capture on every failure
Example
Playwright Typescript allows configuring trace recording based on retry behavior directly in playwright.config.ts,
use: {
trace: 'on-first-retry', // record traces on first retry of each test
}
In playwright java, there is no equivalent retry based configuration.
Motivation
Retry-based trace recording significantly improves debugging efficiently while minimizing performance and storage overhead. In CI pipelines, capturing traces for every test run can generate large artifacts and increase execution time.