Page MenuHomePhabricator

RelatedArticles browser tests on beta cluster are failing
Closed, ResolvedPublic

Description

Status


Gerrit

Jenkins

Documentation

CI failure:

[Chrome 71.0.3578.80 linux #0-0] Spec: /src/tests/selenium/specs/readmore.js
[Chrome 71.0.3578.80 linux #0-0] Running: Chrome (v71.0.3578.80) on linux
[Chrome 71.0.3578.80 linux #0-0] Session ID: dea4fd15-d44d-474b-9309-5b6a3c8e529e
[Chrome 71.0.3578.80 linux #0-0]
[Chrome 71.0.3578.80 linux #0-0] ReadMore
[Chrome 71.0.3578.80 linux #0-0]    โœ– ReadMore is not present on Vector
[Chrome 71.0.3578.80 linux #0-0]    โœ“ ReadMore is present in Minerva
[Chrome 71.0.3578.80 linux #0-0]
[Chrome 71.0.3578.80 linux #0-0] 1 passing (13.8s)
[Chrome 71.0.3578.80 linux #0-0] 1 failing
[Chrome 71.0.3578.80 linux #0-0]
[Chrome 71.0.3578.80 linux #0-0] 1) ReadMore ReadMore is not present on Vector
[Chrome 71.0.3578.80 linux #0-0] waitUntil condition timed out after 10000ms
[Chrome 71.0.3578.80 linux #0-0] Error: waitUntil condition timed out after 10000ms
[Chrome 71.0.3578.80 linux #0-0]     at ReadMorePage.resourceLoaderModuleStatus (/src/tests/selenium/pageobjects/readmore.page.js:44:18)
[Chrome 71.0.3578.80 linux #0-0]     at ReadMorePage.openDesktop (/src/tests/selenium/pageobjects/readmore.page.js:12:8)
[Chrome 71.0.3578.80 linux #0-0]     at Context.<anonymous> (/src/tests/selenium/specs/readmore.js:26:16)

Spec Files:	 0 passed, 1 failed, 1 total (100% completed) in 00:00:19

Local failure when targeting beta cluster:

[Chrome 83.0.4103.116 darwin #0-0] Spec: /Users/z/Documents/gerrit/mediawiki/core/extensions/RelatedArticles/tests/selenium/specs/readmore.js
[Chrome 83.0.4103.116 darwin #0-0] Running: Chrome (v83.0.4103.116) on darwin
[Chrome 83.0.4103.116 darwin #0-0] Session ID: c7b94995-f6a1-43ca-84ed-a75a29636788
[Chrome 83.0.4103.116 darwin #0-0]
[Chrome 83.0.4103.116 darwin #0-0] ReadMore
[Chrome 83.0.4103.116 darwin #0-0]    โœ– ReadMore is not present on Vector
[Chrome 83.0.4103.116 darwin #0-0]    โœ“ ReadMore is present in Minerva
[Chrome 83.0.4103.116 darwin #0-0]
[Chrome 83.0.4103.116 darwin #0-0] 1 passing (18.3s)
[Chrome 83.0.4103.116 darwin #0-0] 1 failing
[Chrome 83.0.4103.116 darwin #0-0]
[Chrome 83.0.4103.116 darwin #0-0] 1) ReadMore ReadMore is not present on Vector
[Chrome 83.0.4103.116 darwin #0-0] waitUntil condition timed out after 10000ms
[Chrome 83.0.4103.116 darwin #0-0] Error: waitUntil condition timed out after 10000ms
[Chrome 83.0.4103.116 darwin #0-0]     at ReadMorePage.resourceLoaderModuleStatus (/Users/z/Documents/gerrit/mediawiki/core/extensions/RelatedArticles/tests/selenium/pageobjects/readmore.page.js:44:18)
[Chrome 83.0.4103.116 darwin #0-0]     at ReadMorePage.openDesktop (/Users/z/Documents/gerrit/mediawiki/core/extensions/RelatedArticles/tests/selenium/pageobjects/readmore.page.js:12:8)
[Chrome 83.0.4103.116 darwin #0-0]     at Context.<anonymous> (/Users/z/Documents/gerrit/mediawiki/core/extensions/RelatedArticles/tests/selenium/specs/readmore.js:26:16)

Spec Files:      0 passed, 1 failed, 1 total (100% completed) in 00:00:26

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJun 10 2020, 6:16 PM
zeljkofilipin added a subscriber: zeljkofilipin.

@Jdlrobson why did you tag this with Quality-and-Test-Engineering-Team (QTE)? Do you need help fixing the failures?

@zeljkofilipin the failures seem related to T250685 as they correspond with a patch merged against that.

zeljkofilipin triaged this task as High priority.
zeljkofilipin added a subscriber: Vidhi-Mody.

@Vidhi-Mody can you please take a look at the failures? Let me know if you need help.

I'm getting daily email notifications about this. Is it possible I could be removed from the mailing list for now?

I'm getting daily email notifications about this. Is it possible I could be removed from the mailing list for now?

Sure, I'll do it today.

Console output of the failed Jenkins job
https://integration.wikimedia.org/ci/job/selenium-daily-beta-RelatedArticles/688/console

23:11:19 > @ selenium-test /src
23:11:19 > wdio tests/selenium/wdio.conf.js
23:11:19 
23:11:20 
23:11:20 Execution of 1 spec files started at 2020-06-09T17:41:20.818Z
23:11:20 
23:11:20 (node:174) ExperimentalWarning: The dns.promises API is experimental
23:11:20 (node:174) ExperimentalWarning: The fs.promises API is experimental
23:11:21 [0-0] (node:183) ExperimentalWarning: The dns.promises API is experimental
23:11:21 [0-0] (node:183) ExperimentalWarning: The fs.promises API is experimental
23:11:22 [0-0] RUNNING in chrome - /tests/selenium/specs/readmore.js
23:11:29 [0-0] [17:41:29] [S] [MWBOT] Login successful: Selenium user@https://en.wikipedia.beta.wmflabs.org/w
23:11:41 [0-0] 
23:11:41 	Screenshot: /log/ReadMore-is-not-present-on-Vector.png
23:11:41 
23:11:41 [0-0] Error in "ReadMore ReadMore is not present on Vector"
23:11:41 waitUntil condition timed out after 10000ms
23:11:42 [0-0] 
23:11:42 	Screenshot: /log/ReadMore-is-present-in-Minerva.png
23:11:42 
23:11:42 [0-0] FAILED in chrome - /tests/selenium/specs/readmore.js
23:11:42 
23:11:42  "spec" Reporter:
23:11:42 ------------------------------------------------------------------
23:11:42 [Chrome 71.0.3578.80 linux #0-0] Spec: /src/tests/selenium/specs/readmore.js
23:11:42 [Chrome 71.0.3578.80 linux #0-0] Running: Chrome (v71.0.3578.80) on linux
23:11:42 [Chrome 71.0.3578.80 linux #0-0] Session ID: 5a39372f-3eae-4a4d-b4e2-e44b183e760b
23:11:42 [Chrome 71.0.3578.80 linux #0-0]
23:11:42 [Chrome 71.0.3578.80 linux #0-0] ReadMore
23:11:42 [Chrome 71.0.3578.80 linux #0-0]    โœ– ReadMore is not present on Vector
23:11:42 [Chrome 71.0.3578.80 linux #0-0]    โœ“ ReadMore is present in Minerva
23:11:42 [Chrome 71.0.3578.80 linux #0-0]
23:11:42 [Chrome 71.0.3578.80 linux #0-0] 1 passing (15.5s)
23:11:42 [Chrome 71.0.3578.80 linux #0-0] 1 failing
23:11:42 [Chrome 71.0.3578.80 linux #0-0]
23:11:42 [Chrome 71.0.3578.80 linux #0-0] 1) ReadMore ReadMore is not present on Vector
23:11:42 [Chrome 71.0.3578.80 linux #0-0] waitUntil condition timed out after 10000ms
23:11:42 [Chrome 71.0.3578.80 linux #0-0] Error: waitUntil condition timed out after 10000ms
23:11:42 [Chrome 71.0.3578.80 linux #0-0]     at ReadMorePage.resourceLoaderModuleStatus (/src/tests/selenium/pageobjects/readmore.page.js:44:18)
23:11:42 [Chrome 71.0.3578.80 linux #0-0]     at ReadMorePage.openDesktop (/src/tests/selenium/pageobjects/readmore.page.js:12:8)
23:11:42 [Chrome 71.0.3578.80 linux #0-0]     at Context.<anonymous> (/src/tests/selenium/specs/readmore.js:25:16)
23:11:42 
23:11:42 
23:11:42 Spec Files:	 0 passed, 1 failed, 1 total (100% completed) in 00:00:21

Console output on running the tests locally

> @ selenium-test /home/vidhi/MediaWiki/extensions/RelatedArticles
> wdio tests/selenium/wdio.conf.js


Execution of 1 spec files started at 2020-06-24T17:54:33.668Z

[0-0] RUNNING in chrome - /tests/selenium/specs/readmore.js
[0-0] [23:24:51] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
[0-0] 
        Screenshot: /home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/log/ReadMore-is-not-present-on-Vector.png

[0-0] 
        Screenshot: /home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/log/ReadMore-is-present-in-Minerva.png

[0-0] Error in "ReadMore ReadMore is present in Minerva"
Can't call click on element with selector "#footer-places-mobileview" because element wasn't found
[0-0] FAILED in chrome - /tests/selenium/specs/readmore.js

 "spec" Reporter:
------------------------------------------------------------------
[Chrome 83.0.4103.61 linux #0-0] Spec: /home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/specs/readmore.js
[Chrome 83.0.4103.61 linux #0-0] Running: Chrome (v83.0.4103.61) on linux
[Chrome 83.0.4103.61 linux #0-0] Session ID: da914c0a-dc19-4d22-bcb8-02c18897962b
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] ReadMore
[Chrome 83.0.4103.61 linux #0-0]    โœ“ ReadMore is not present on Vector
[Chrome 83.0.4103.61 linux #0-0]    โœ– ReadMore is present in Minerva
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] 1 passing (18.4s)
[Chrome 83.0.4103.61 linux #0-0] 1 failing
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] 1) ReadMore ReadMore is present in Minerva
[Chrome 83.0.4103.61 linux #0-0] Can't call click on element with selector "#footer-places-mobileview" because element wasn't found
[Chrome 83.0.4103.61 linux #0-0] Error: Can't call click on element with selector "#footer-places-mobileview" because element wasn't found
[Chrome 83.0.4103.61 linux #0-0]     at ReadMorePage.openMobile (/home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/pageobjects/readmore.page.js:17:19)
[Chrome 83.0.4103.61 linux #0-0]     at Context.<anonymous> (/home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/specs/readmore.js:30:16)


Spec Files:      0 passed, 1 failed, 1 total (100% completed) in 00:00:33

Looks like you're targeting a local mediawiki:

...
[0-0] [23:24:51] [S] [MWBOT] Login successful: Admin@http://localhost:8080/
...

Run the tests targeting beta cluster. You have to set these environment variables in your terminal.

export MEDIAWIKI_USER=mediawiki_user
export MEDIAWIKI_PASSWORD=mediawiki_password
export MW_SERVER=https://en.wikipedia.beta.wmflabs.org

(Create an account at https://en.wikipedia.beta.wmflabs.org/ and replace the above username/password.)

More information: https://www.mediawiki.org/wiki/Selenium/Getting_Started/Run_tests_targeting_Beta_cluster

Change 608059 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] Do not send notifications for selenium-daily-beta-RelatedArticles to Jon Robson

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

I'm getting daily email notifications about this. Is it possible I could be removed from the mailing list for now?

Apologies for being slow on this. I've created the patch: https://gerrit.wikimedia.org/r/608059

Change 608059 merged by jenkins-bot:
[integration/config@master] Do not send notifications for selenium-daily-beta-RelatedArticles to Jon Robson

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

On running tests targeting Beta cluster

vidhi@vidhi-Inspiron-13-5378:~/MediaWiki/extensions/RelatedArticles$ npm run selenium-test

> @ selenium-test /home/vidhi/MediaWiki/extensions/RelatedArticles
> wdio tests/selenium/wdio.conf.js


Execution of 1 spec files started at 2020-06-28T18:48:43.066Z

[0-0] RUNNING in chrome - /tests/selenium/specs/readmore.js
[0-0] Error in "ReadMore "before all" hook for "ReadMore is not present on Vector""
invalidjson: No valid JSON response
[0-0] FAILED in chrome - /tests/selenium/specs/readmore.js

 "spec" Reporter:
------------------------------------------------------------------
[Chrome 83.0.4103.61 linux #0-0] Spec: /home/vidhi/MediaWiki/extensions/RelatedArticles/tests/selenium/specs/readmore.js
[Chrome 83.0.4103.61 linux #0-0] Running: Chrome (v83.0.4103.61) on linux
[Chrome 83.0.4103.61 linux #0-0] Session ID: 76c9211c-2fe2-49fb-a780-91821b5f7aac
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] ReadMore
[Chrome 83.0.4103.61 linux #0-0]    โœ– "before all" hook
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] 1 failing (1.6s)
[Chrome 83.0.4103.61 linux #0-0]
[Chrome 83.0.4103.61 linux #0-0] 1) ReadMore "before all" hook
[Chrome 83.0.4103.61 linux #0-0] invalidjson: No valid JSON response
[Chrome 83.0.4103.61 linux #0-0] Error: invalidjson: No valid JSON response
[Chrome 83.0.4103.61 linux #0-0]     at /home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/mwbot/src/index.js:249:31
[Chrome 83.0.4103.61 linux #0-0]     at tryCatcher (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/util.js:16:23)
[Chrome 83.0.4103.61 linux #0-0]     at Promise._settlePromiseFromHandler (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/promise.js:547:31)
[Chrome 83.0.4103.61 linux #0-0]     at Promise._settlePromise (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/promise.js:604:18)
[Chrome 83.0.4103.61 linux #0-0]     at Promise._settlePromise0 (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/promise.js:649:10)
[Chrome 83.0.4103.61 linux #0-0]     at Promise._settlePromises (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/promise.js:729:18)
[Chrome 83.0.4103.61 linux #0-0]     at _drainQueueStep (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/async.js:93:12)
[Chrome 83.0.4103.61 linux #0-0]     at _drainQueue (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/async.js:86:9)
[Chrome 83.0.4103.61 linux #0-0]     at Async._drainQueues (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/async.js:102:5)
[Chrome 83.0.4103.61 linux #0-0]     at Immediate.Async.drainQueues [as _onImmediate] (/home/vidhi/MediaWiki/extensions/RelatedArticles/node_modules/bluebird/js/release/async.js:15:14)
[Chrome 83.0.4103.61 linux #0-0]     at processImmediate (internal/timers.js:456:21)
[Chrome 83.0.4103.61 linux #0-0]     at process.topLevelDomainCallback (domain.js:137:15)


Spec Files:      0 passed, 1 failed, 1 total (100% completed) in 00:00:02

Run env in your terminal and copy/paste lines with MEDIAWIKI_USER and MW_SERVER.

Output of running the env command

MEDIAWIKI_USER=vidhi-mody
MW_SERVER=https://en.wikipedia.beta.wmflabs.org
Restricted Application added a subscriber: Masumrezarock100. ยท View Herald TranscriptJun 30 2020, 10:00 AM
zeljkofilipin updated the task description. (Show Details)

Change 608585 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/extensions/RelatedArticles@master] Selenium: fix "ReadMore is not present on Vector" test

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/RelatedArticles/ /608585

Change 608585 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Selenium: run only 'ReadMore is present in Minerva' test when targeting the Beta Cluster

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