Page MenuHomePhabricator

Write selenium tests for CheckUser
Closed, ResolvedPublicFeature

Description

Currently there exists no front-end browser tests for CheckUser. Due to the added complexity of testing for correct page output using phpunit, using selenium (which is built for testing the page that is sent to the browser) will allow the automated testing of whether the user can use the special pages implemented by CheckUser. This will also likely need some test data that can be preloaded into the CheckUser table and also likely a reset of the DB on every test as events (such as logins) will affect the data seen by the next test.

Event Timeline

Change 833468 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Start on selenium tests for browser side testing of CheckUser

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

Change 833468 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Start on selenium tests for browser side testing of CheckUser

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

I'm assuming you were following the documentation or sample code I wrote (and forgot to update), but we've switched from sync to async mode for selenium tests (because of upstream changes). See T256626 for details. It would be great if you moved to async mode while there isn't much code. Let me know if you need help or reviews.

Change 850611 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Selenium: Allow tests to grant checkuser group and some more tests

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

Writing most of the tests is blocked on being able to have an account that has the checkuser group. Doing that is detailed in a subtask.

Change 850611 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Selenium: Allow tests to grant checkuser group and some more tests

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

Dreamy_Jazz moved this task from Patches for review to Inbox on the CheckUser board.

Change 876323 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Remove version.js test and add more checkuser/checkuserlog tests

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

Change 881593 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Remove version.js test

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

Change 881593 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Remove version.js test

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

Change 876323 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add more Special:CheckUser and Special:CheckUserLog selenium tests

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

Change 921487 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Add further selenium tests for the CheckUser extension

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

Change 921487 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add further selenium tests for the CheckUser extension

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

Removing Wikimania-Hackathon-2023 as this will remain open but progress on this is done for this hackathon.

zeljkofilipin raised the priority of this task from Medium to Needs Triage.Oct 31 2023, 4:22 PM
Dreamy_Jazz closed this task as Resolved.EditedOct 31 2023, 4:24 PM
Dreamy_Jazz claimed this task.

I'm going to mark this as resolved, as tests now exist which check that Special:CheckUser and Special:Investigate can be used. Checking the results themselves using selenium is probably not going to be useful enough to justify the extra time it takes to test (as this should already be covered by PHPUnit tests).