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.
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Feature | Dreamy_Jazz | T318448 Write selenium tests for CheckUser | ||
| Resolved | None | T321965 Allow the jenkins selenium tests to grant the test user the checkuser group/right for testing |
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
Change 833468 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Start on selenium tests for browser side testing of CheckUser
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
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
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
Change 881593 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):
[mediawiki/extensions/CheckUser@master] Remove version.js test
Change 881593 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Remove version.js test
Change 876323 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add more Special:CheckUser and Special:CheckUserLog selenium tests
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
Change 921487 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add further selenium tests for the CheckUser extension
Removing Wikimania-Hackathon-2023 as this will remain open but progress on this is done for this hackathon.
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).