Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review

97588[TASK] Run Playwright e2e tests with multiple workers in CI

Benni Mack CR 0 V -1 Hard +259 −35 updated 11/18/26, 10:38

Commit message

Every e2e shard ran its tests with a single worker in CI. Instance
setup takes about 15 seconds, the rest of the job is test execution,
which makes these shards the longest jobs of the pre-merge pipeline.

Raising the worker count alone breaks tests, as all workers share one
TYPO3 instance. Three things are needed to run the specs side by side:

* Each worker logs in with its own administrator. Session data such
  as flash messages, user settings, user TSconfig and the selected
  workspace no longer leak from one worker into the tests of another.
  A new "backendUser" fixture exposes the user of the worker to the
  specs that referred to the uid or name of "admin".

* The spec files are split into three Playwright projects. Specs
  saving the same styleguide record or the scheduler task list only
  collide with each other and run one at a time in "e2e-sequential",
  next to the parallel "e2e" project. Specs changing state every
  other spec observes - install tool and system settings, the site
  configuration, pages other specs navigate to, workspaces - are in
  "e2e-isolated". runTests.sh runs that project in a second
  Playwright invocation after the others have finished. The frontend
  specs are part of it for now, as resolving a page fails on SQLite
  with "database is locked" when another request writes at the same
  time.

* Playwright distributes specs to shards by test count, which left
  some shards with far more test time than others. runTests.sh now
  hands the shard over as TYPO3_E2E_SHARD and playwright.config.ts
  spreads the spec files of each project by their measured duration.

CI uses three workers. Two specs waited for too little and raced
under parallel load, they wait for the reload they triggered now. The
accessibility check of the recycler scans a page nothing is deleted
from by other specs.

Measured locally in composer mode on SQLite, the four shards drop
from 208 to 276 seconds to 106 to 138 seconds. The number of shards
stays at four.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/88/97588/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/88/97588/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Relation chain 2

  1. 97588 [TASK] Run Playwright e2e tests with multiple workers in CI This change

  2. main 97587[TASK] Speed up FormEngine input e2e specs This change is based on it Merged Benni Mack CR +2 V +2 → 14.3 Easy +25 −15

Issues 2

Files 13

Review log 35

  1. Benni Mack uploaded patch set 1 11/12/26, 20:17

  2. core-ci voted on patch set 1 V +1 11/12/26, 20:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114222

  3. Benni Mack rebased onto patch set 2 V +1 11/12/26, 20:51

  4. core-ci voted on patch set 2 V -1 11/12/26, 21:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114232

  5. Benjamin Franzke commented on patch set 2 11/18/26, 10:38

    playwright.config.ts:57 Unresolved

    No offense, but these lists read like something that will be hard for us to manage in the long run. I'd rather live with semi-optimal balancing than this optimization for *current state*, which needs to be adapted whenever we add new tests, right? I feel like the tests should annotate Test locks as described on https://playwright.dev/docs/test-parallel#test-locks