Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: trace: retain-all-failures #30527

Closed
olivierbeaulieu opened this issue Apr 24, 2024 · 1 comment
Closed

[Feature]: trace: retain-all-failures #30527

olivierbeaulieu opened this issue Apr 24, 2024 · 1 comment

Comments

@olivierbeaulieu
Copy link

馃殌 Feature Request

We use test traces to debug flaky tests. However, the current trace options do not allow me to capture traces for a test that fails on the first try, and then passes on retry without using the on option, which generates way more traces than needed.

What I want is essentially retain-on-failure, but without the last part of its description - "When test run passes, remove the recorded trace.".

I want all have all traces of failed tests, regardless of whether they passed on retry, and want no traces for successful attempts.

Example

playwright.config.ts would have { use: { trace: 'retain-all-failures' } }

Motivation

It will make it easier to address flaky tests.

@olivierbeaulieu olivierbeaulieu closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@Nav-2d
Copy link
Contributor

Nav-2d commented Apr 24, 2024

I think for your use case, retain-on-failure will work.

'retain-on-failure': Record trace for each test. When test run passes, remove the recorded trace.

It means if the test passes on retry, it will remove the passed trace file but not remove the failed first attempt.

What issue are you facing when you use retain-on-failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants