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]: 'retain-on-first-failure' option for screenshots #30701

Open
bmendoza0123 opened this issue May 7, 2024 · 0 comments
Open

[Feature]: 'retain-on-first-failure' option for screenshots #30701

bmendoza0123 opened this issue May 7, 2024 · 0 comments

Comments

@bmendoza0123
Copy link

馃殌 Feature Request

Since I'm using the option trace: 'retain-on-first-failure' with retries: 3 and screenshot: 'only-on-failure', I am oftentimes left with artifacts for tests that have retried and only contain screenshots without traces. This isn't a problem but more so, I'd prefer to omit those screenshots that don't have corresponding traces, as they don't really give me much to debug a test failure on, as opposed to the combination of a screenshot and a trace. I'd be awesome to have the option of screenshot: 'retain-on-first-failure' so that all artifacts retained contain both screenshots and traces.

Example

projects: [
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
        trace: 'retain-on-first-failure',
        screenshot: 'retain-on-first-failure',
      },
    }
]

Motivation

I believe this will make Playwright better by providing a larger set of options that allows it's consumers to configure exactly how they'd like to digest artifacts. For example, I'm highly motivated to reduce the size of artifacts created by Playwright tests without sacrificing the tooling provided by Playwright to debug, therefore, having just artifacts with screenshots isn't super helpful and just increases artifacts size. A win win situation would be having the option screenshot: 'retain-on-first-failure' to go along with trace: 'retain-on-first-failure' 馃槂.

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

No branches or pull requests

2 participants