Skip to content

Commit

Permalink
test: speed up e2e tests by retaining videos only on retry (#2027)
Browse files Browse the repository at this point in the history
Shaved about a minute off locally for me, but I didn't get a clean run
because of some styleguide timeouts still.
  • Loading branch information
dsmmcken authored May 23, 2024
1 parent c9ac72d commit 34d6472
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ const config: PlaywrightTestConfig = {
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',

/* Retain videos on failure for easier debugging */
video: 'retain-on-failure',
/**
* Retain videos on failure locally for easier debugging.
* In CI, only retain videos on the first retry to speed
* up tests. Successful tests can skip recording and
* saving entirely which is notably slow in webkit. See:
* https://github.com/microsoft/playwright/issues/18119#issuecomment-1867426196
*/
video: process.env.CI ? 'on-first-retry' : 'retain-on-failure',
},

/* Configure projects for major browsers */
Expand Down

0 comments on commit 34d6472

Please sign in to comment.