Page MenuHomePhabricator

Rewrite disabled MobileFrontend browser tests to phpunit tests and Node.js browser tests
Open, MediumPublic8 Estimate Story Points

Description

Our browser tests for MobileFrontend were broken and disabled. This task deals with the cleanup related to restoring them in the MobileFrontend extension.

Following an audit, new guidelines https://www.mediawiki.org/wiki/Reading/Web/QA#What_are_browser_tests_for and discussion of that audit and suggested guidelines it has been proposed that the remaining browser tests are either deleted or reimplemented as phpunit tests, since they do not test behaviour - they test page content.

Acceptance criteria

  • Add new job selenium-daily-beta-MobileFrontend
  • new job selenium-daily-beta-MobileFrontend should be green and passing
  • All tests should run starting from the desktop domain (T130429). This has caused issues historically and should be avoided when rewriting them.
  • special_contributions.feature has been rewritten as a PHPUnit test (and associated code refactored)
  • special_watchlist.feature and special_watchlist_editors.feature have been rewritten as a Node.js test (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/506592/)
  • user_page.feature has been rewritten as a Node.js test
  • special_history.feature and special_history_nojs.feature has been rewritten as a PHPUnit test (and associated code refactored)
  • special_watchlist_newuser.feature has been rewritten as a PHPUnit test (and associated code refactored) - https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/506591/1
  • switch_views.feature has been rewritten as a Node.js test
  • Disable the Ruby job in integration/config for daily builds and for commits
  • While working on this, do an audit as originally proposed in T148973 of what we are testing. Remove unnecessary tests and document missing tests. At the end, summarise the browser test for each extension.

Sign off steps

  • Ensure the user_page test has been restored (T221860)

Note: It was skipped indefinitely. The value was not worth the hassle.

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterWIP: Rewrite watchlist tests in Node.js
mediawiki/extensions/MobileFrontend : masterAudit: Remove unnecessary browser tests
integration/config : masterDelete selenium-MobileFrontend Jenkins job
mediawiki/extensions/MobileFrontend : master๐Ÿ— Remove Ruby browser tests
mediawiki/extensions/MobileFrontend : masterWIP: Rewrite MobileFronted Ruby tests to NodeJS
integration/config : masterDrop Selenium Ruby jobs from Jenkins on MobileFrontend
mediawiki/extensions/MobileFrontend : masterAdd wdio-mocha-framework to package.json
mediawiki/extensions/MobileFrontend : masterMigrate browser tests from Ruby to Node.js

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
pmiazga claimed this task.Nov 3 2017, 10:14 PM

@ovasileva @phuedx @Jdlrobson My understanding is that a "subtask" in the title of a task indicates that it is part of an existing task that already has an estimate. However, this has 8 points on it. Am I missing something?

It's a big subtask - we want to port unit tests to node.js and we have to do that for all extensions. This task fixes unit tests only for MobileFrontend extension (and because of that it is a subtask). That's my understanding.

Thanks, @pmiazga . Being a big task is not enough to estimate it if it is still part of another task that has already been estimated (even if the original parent task was grossly underestimated). It defeats the purpose of estimation, and is redundant. The exception is if the task is, in reality, delivering something on top of the first task, rather than on behalf of it. In that case, it should simply not be labeled "subtask". :)

MBinder_WMF renamed this task from [subtask] Rewrite MobileFrontend's browser tests to Rewrite MobileFrontend's browser tests.Nov 9 2017, 6:13 PM

Clarified in standup that this task is a "subtask" of an epic, but not a "[subtask]" of an estimated task that is deliverable in its own right. Updated the title.

Change 392026 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/MobileFrontend@master] Rewrite MobileFronted Ruby tests to NodeJS

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

pmiazga removed pmiazga as the assignee of this task.Nov 29 2017, 1:31 PM
pmiazga moved this task from Doing to Blocked on Others on the Readers-Web-Kanbanana-Board-Old board.

We're deferring this task till later. We are finding this task tricky to fit into our current commitments. Plan is to work out ways we can make this transition easier. WAtch this space!

Jdlrobson changed the task status from Open to Stalled.Dec 7 2017, 8:53 PM
Jdlrobson assigned this task to phuedx.

Per discussion, @phuedx we need to identify some ways to speed up this migration.

Jdlrobson renamed this task from Rewrite MobileFrontend's browser tests to Rewrite MobileFrontend's browser tests from Ruby to Node.Aug 14 2018, 9:43 PM

Change 502907 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Migrate browser tests from Ruby to Node.js

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

Change 502907 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Migrate browser tests from Ruby to Node.js

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

Change 504328 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Add wdio-mocha-framework to package.json

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

Change 504328 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add wdio-mocha-framework to package.json

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

Jdlrobson changed the task status from Stalled to Open.Apr 23 2019, 8:04 AM
Jdlrobson removed the point value for this task.
Jdlrobson updated the task description. (Show Details)Apr 23 2019, 8:10 AM
Jdlrobson moved this task from Upcoming to Needs Prioritization on the Readers-Web-Backlog board.

Quite possible we're want to break this down into smaller tasks.

Change 506343 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[integration/config@master] Drop Selenium Ruby jobs from Jenkins on MobileFrontend

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

Change 506343 merged by jenkins-bot:
[integration/config@master] Drop Selenium Ruby jobs from Jenkins on MobileFrontend

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

Change 506427 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] ๐Ÿ— Remove Ruby browser tests

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

Jdlrobson updated the task description. (Show Details)Apr 25 2019, 3:01 PM

Change 506591 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Audit: Remove unnecessary browser tests

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

Change 506592 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] WIP: Rewrite watchlist tests in Node.js

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

After looking into this, I think we should not bother with most of the Selenium browser tests. Testing behaviour seems important, but not

Let's estimate the work involved to:

  1. Port the watchlist tests I've highlighted as being useful to Node.js
  2. Rewriting the tests I identified in my audit to phpunit
  3. Cleaning up the repo. e.g. https://gerrit.wikimedia.org/r/506427
Jdlrobson renamed this task from Rewrite MobileFrontend's browser tests from Ruby to Node to Rewrite remaining MobileFrontend's Ruby browser tests to phpunit tests and Node.js browser tests.May 1 2019, 8:37 PM
Jdlrobson removed phuedx as the assignee of this task.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
ovasileva set the point value for this task to 8.May 8 2019, 4:58 PM

Change 392026 abandoned by Pmiazga:
WIP: Rewrite MobileFronted Ruby tests to NodeJS

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

Change 506427 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] ๐Ÿ— Remove Ruby browser tests

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

Jdlrobson updated the task description. (Show Details)
hashar removed a subscriber: hashar.Jul 9 2019, 8:58 AM

Should this task be resolved? There's nothing left in tests/browser.

No there are 4 open checkboxes on this ticket. Ruby tests were deleted but not all the tests got ported.

Jdlrobson renamed this task from Rewrite remaining MobileFrontend's Ruby browser tests to phpunit tests and Node.js browser tests to Rewrite disabled MobileFrontend browser tests to phpunit tests and Node.js browser tests.Jul 9 2019, 2:48 PM

Change 522488 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] Delete selenium-MobileFrontend Jenkins job

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

Change 522488 merged by jenkins-bot:
[integration/config@master] Delete selenium-MobileFrontend Jenkins job

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

Jdlrobson lowered the priority of this task from High to Medium.Jul 31 2019, 4:24 PM

Change 506591 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Audit: Remove unnecessary browser tests

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