Skip to content

test: Run playwright tests in parallel #7334

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 6, 2023
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 6, 2023

This:

  • updates the workers config for playwright, making sure we use the default on local machines (which depends on available CPU cores), and bump it to 5 on CI to speed this up slightly
  • enabled fullyParallel config to ensure tests inside of a file are also parallelised - IMHO failures due to this show bad test design anyhow, so this should be fine.

@mydea mydea self-assigned this Mar 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.12 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 62.52 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.76 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 55.51 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.5 KB (0%)
@sentry/browser - Webpack (minified) 66.97 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.52 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 48.12 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.09 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.33 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 42.87 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 36.93 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.49 KB (0%)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 54 KB (0%)

@mydea mydea marked this pull request as ready for review March 6, 2023 11:30
@mydea mydea requested review from Lms24, lforst and AbhiPrasad March 6, 2023 11:31
@mydea mydea force-pushed the fn/playwright-parallel branch from 82a097e to 379f59e Compare March 6, 2023 11:32
// Run tests inside of a single file in parallel
fullyParallel: true,
// Use 3 workers on CI, else use defaults (based on available CPU cores)
workers: process.env.CI ? 5 : undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Any reason for 5 specifically?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it was 3 previously and I randomly set it to 5 to see if it still works as expected, and it did (and was slightly faster on CI). FYI without this on CI it defaults to just one worker, because CI has two cores, and the default heuristic is # of CPUS/2.
I can also leave it at 3 for CI (but I guess that is equally random 😅 )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No 5 is totally fine, I was just wondering 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will adjust the comment to make it clear this is an arbitrary number! 😂

@mydea mydea merged commit 77a810d into develop Mar 6, 2023
@mydea mydea deleted the fn/playwright-parallel branch March 6, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants