[QA] Add parallel E2E test execution in CI#4305
[QA] Add parallel E2E test execution in CI#4305syde-piotr-ostrowski wants to merge 3 commits intodev/developfrom
Conversation
|
|
||
| e2e-playwright-parallel: | ||
| name: Run Playwright E2E Tests / ${{ matrix.shard }} | ||
| if: ${{ inputs.TEST_SUITE == 'e2e:test:all:parallel' }} |
There was a problem hiding this comment.
e2e-playwright and e2e-playwright-parallel are almost duplicate. It should be possible to resolve matrix in a separate job and avoid duplication of other code?
| // Parallel CI | ||
| { | ||
| name: 'shard:plugin-foundation', | ||
| dependencies: [ 'setup-woocommerce' ], |
There was a problem hiding this comment.
plugin-foundation was the only set of tests which required not installed PCP plugin.
Since plugin-foundation is already the separate project, I was about to extract the common preconditions from other test specs. But since your PR is quite close to it I'd suggest to do it here.
All of the projects depend on setup-woocommerce but almost all except plugin-foundation might also depend on setup-pcp-usa-for-tests (or similar, like setup-pcp-vaulting, setup-pcp-subscription). This would allow to shorten beforeAll hooks which in case if test fails are being reexecuted and cause significant time loss. So I was thinking about something like:
{
name: 'setup-pcp-usa-for-tests',
dependencies: [ 'setup-woocommerce' ],
testMatch: /pcp\.setup\.ts/,
grep: 'setup:pcp:usa;',
},
{
name: 'shard:transactions',
dependencies: [ 'setup-pcp-usa-for-tests' ],
testMatch: /05-transactions\/.*\.spec\.ts/,
},Note: There's
setup-pcpproject already but it has many setups and also serves forenv:setupnpm scripts.
|
@mishautkin
Checked test execution locally. Now running in GitHub here |
There was a problem hiding this comment.
Hi, @syde-piotr-ostrowski, thank you for the updates. Have couple of general comments:
- I see there are a lot of failed tests in CI runs (e.g. I cansee that ACDC gateway is not visible)
All of the shards have the same name -run-playwright-tests. Is it possible to change the name per shard?
Update:run-playwright-testsis a job name in reusabletest-playwright.yml. Let's skip it in this PR
Adds a separate CI option for running the full Playwright E2E suite in parallel across multiple wp-env setups.
The new
e2e:test:all:parallelworkflow input splits execution into dedicated shards for:Each shard runs in its own CI job, allowing tests to execute independently instead of blocking each other.
For now this is added as a separate manual workflow option, so the existing default E2E runs remain unchanged. In the future, this parallel execution can be promoted to the default release test run.
How to run
e2e:test:all:parallel.Test run
Here you can view the how the workflow was executed