Page MenuHomePhabricator

Look into splitting user.js and page.js test into multiple spec files
Closed, ResolvedPublicSpike

Description

When we run more test in parallel in core, there are two test suites that defines the total run time, It's user.js that takes 38 seconds and page.js that takes 41 seconds. If we could split these tests into two suites we could reduce the runtime for core. Since core is the tests that runs most in CI that makes sense.

00:02:01.738 [chrome-headless-shell 120.0.6099.224 linux #0-8] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:02:01.738 [chrome-headless-shell 120.0.6099.224 linux #0-8] Session ID: 573e2ebde10d1082c146620d2b52227c
00:02:01.738 [chrome-headless-shell 120.0.6099.224 linux #0-8]
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8] » tests/selenium/specs/user.js
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8] User
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ should be able to create account
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ should be able to log in
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ named user should see extra signup form fields when creating an account
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ temporary user should not see signup form fields relevant to named users
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ temporary user should be able to create account
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ should be able to block a user
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8]
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-8] 6 passing (38.9s)
00:02:01.739 ------------------------------------------------------------------
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-6] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-6] Session ID: 812254cb4111068b07adf05dcf6f3f1b
00:02:01.739 [chrome-headless-shell 120.0.6099.224 linux #0-6]
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6] » tests/selenium/specs/page.js
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6] Page
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be previewable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be creatable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be re-creatable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be editable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should have history
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be deletable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be restorable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be protectable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be undoable
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6]
00:02:01.740 [chrome-headless-shell 120.0.6099.224 linux #0-6] 9 passing (41.5s)

Event Timeline

Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptFeb 16 2026, 7:27 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1239566 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selenium: Split user tests to user and temporary user

https://gerrit.wikimedia.org/r/1239566

Splitting user to to spec files (temporary user and user):

00:01:50.287 [chrome-headless-shell 120.0.6099.224 linux #0-9] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9] Session ID: f95031e2a09c339574bbd3543a49db3b
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9] » tests/selenium/specs/user.js
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9] User
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]    ✓ should be able to create account
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]    ✓ should be able to log in
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]    ✓ named user should see extra signup form fields when creating an account
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]    ✓ should be able to block a user
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9]
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-9] 4 passing (11s)
00:01:50.288 ------------------------------------------------------------------
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8] Session ID: 6371c02bd849079460c1cfd9fcc5d383
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8]
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8] » tests/selenium/specs/temporaryuser.js
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8] User
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ temporary user should not see signup form fields relevant to named users
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8]    ✓ temporary user should be able to create account
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8]
00:01:50.288 [chrome-headless-shell 120.0.6099.224 linux #0-8] 2 passing (26.1s)

Change #1239572 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selenium: Split page into to test suites

https://gerrit.wikimedia.org/r/1239572

Splitting page into two suites:

00:01:49.614 ------------------------------------------------------------------
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7] Session ID: 3f949216ec2eda58e4b685a19136e6d3
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7]
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7] » tests/selenium/specs/pagelifeviewable.js
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7] Page viewing
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7]    ✓ should be previewable
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7]    ✓ should have history
00:01:49.614 [chrome-headless-shell 120.0.6099.224 linux #0-7]    ✓ should be restorable
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-7]    ✓ should be undoable
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-7]
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-7] 4 passing (11.7s)
00:01:49.615 ------------------------------------------------------------------
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6] Running: chrome-headless-shell (v120.0.6099.224) on linux
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6] Session ID: 9fe44c827e3499f63048d871aa487547
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6]
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6] » tests/selenium/specs/pagelifecycle.js
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6] Page lifecycle
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be creatable
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be re-creatable
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be editable
00:01:49.615 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be deletable
00:01:49.616 [chrome-headless-shell 120.0.6099.224 linux #0-6]    ✓ should be protectable
00:01:49.616 [chrome-headless-shell 120.0.6099.224 linux #0-6]
00:01:49.616 [chrome-headless-shell 120.0.6099.224 linux #0-6] 5 passing (26.4s)
00:01:49.616 ------------------------------------------------------------------

Change #1239566 merged by jenkins-bot:

[mediawiki/core@master] selenium: Split user tests to user and temporary user

https://gerrit.wikimedia.org/r/1239566

Change #1239929 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selenium: Split page into admin and user scenarios

https://gerrit.wikimedia.org/r/1239929

Change #1239930 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] selennium: Split temporary user tests

https://gerrit.wikimedia.org/r/1239930

There are some more potential changes coming in this task.

Change #1239572 abandoned by Phedenskog:

[mediawiki/core@master] selenium: Split page into two test suites

Reason:

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1239929 will do the job instead

https://gerrit.wikimedia.org/r/1239572

Change #1239929 merged by jenkins-bot:

[mediawiki/core@master] selenium: Split page into admin and user scenarios

https://gerrit.wikimedia.org/r/1239929

Change #1239930 merged by jenkins-bot:

[mediawiki/core@master] selenium: Split temporary user tests

https://gerrit.wikimedia.org/r/1239930