Page MenuHomePhabricator
Paste P15110

Selenium Test Cases Failed
ArchivedPublic

Authored by Iamumangg on Apr 3 2021, 11:28 AM.
Tags
None
Referenced Files
F34219936: Selenium Test Cases Failed
Apr 3 2021, 8:09 PM
F34219779: Selenium Test Cases Failed
Apr 3 2021, 8:00 PM
F34217272: Selenium Test Cases Failed
Apr 3 2021, 11:28 AM
Subscribers
None
#Working on ubuntu
steps that i followed :
1) I cloned the repo mediawiki .
2) installed docker with some commands .
3) created a .env file and docker-compose.override.yml file .
4) install mediawiki dependencies
5) cloned vector repo and its steps .
6) Ran mediawiki on localhost . perfectly ran in firefox .
7) installed npm and chromium .
6) ran selenium commands mentioned down .
umang@umang-VirtualBox:~/mediawiki$ export MW_SERVER=http://localhost:8080
umang@umang-VirtualBox:~/mediawiki$ export MW_SCRIPT_PATH=/w
umang@umang-VirtualBox:~/mediawiki$ export MEDIAWIKI_USER=Admin
umang@umang-VirtualBox:~/mediawiki$ export MEDIAWIKI_PASSWORD=dockerpass
umang@umang-VirtualBox:~/mediawiki$ npm run selenium-test
> @ selenium-test /home/umang/mediawiki
> wdio ./tests/selenium/wdio.conf.js
Execution of 6 spec files started at 2021-04-03T10:56:24.589Z
[0-0] RUNNING in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-0]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/BlankPage-should-have-its-title-%40daily.png
[0-0] PASSED in chrome - /tests/selenium/wdio-mediawiki/specs/BlankPage.js
[0-1] RUNNING in chrome - /tests/selenium/specs/page.js
[0-1] [16:26:50] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-1]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Page-should-be-previewable.png
[0-1]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Page-should-be-creatable.png
[0-1]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Page-should-be-re-creatable.png
[0-1]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Page-should-be-editable-%40daily.png
[0-1] (node:4148) UnhandledPromiseRejectionWarning: Protocol error (Page.captureScreenshot): Unable to capture screenshot
at Page.<anonymous> (/home/umang/mediawiki/node_modules/puppeteer-core/lib/helper.js:94:19)
at DevToolsDriver.takeScreenshot (/home/umang/mediawiki/node_modules/devtools/build/commands/takeScreenshot.js:10:15)
at Browser.wrappedCommand (/home/umang/mediawiki/node_modules/devtools/build/devtoolsdriver.js:92:47)
at Video.onTestEnd (/home/umang/mediawiki/node_modules/wdio-video-reporter/dist/wdio-video-reporter.js:584:19)
at Video.WDIOReporter.on (/home/umang/mediawiki/node_modules/wdio-video-reporter/node_modules/@wdio/reporter/build/index.js:133:18)
at reporters.forEach.reporter (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:49)
at Array.forEach (<anonymous>)
at BaseReporter.emit (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:20)
at MochaAdapter.emit (/home/umang/mediawiki/node_modules/@wdio/mocha-framework/build/index.js:258:19)
at /home/umang/mediawiki/node_modules/mocha/lib/runner.js:779:14
at done (/home/umang/mediawiki/node_modules/mocha/lib/runnable.js:314:5)
at /home/umang/mediawiki/node_modules/mocha/lib/runnable.js:379:11
[0-1] (node:4148) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[0-1] (node:4148) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[0-1] 2021-04-03T10:57:27.888Z ERROR @wdio/sync: Protocol error (Page.captureScreenshot): Unable to capture screenshot
at Page.<anonymous> (/home/umang/mediawiki/node_modules/puppeteer-core/lib/helper.js:94:19)
at DevToolsDriver.takeScreenshot (/home/umang/mediawiki/node_modules/devtools/build/commands/takeScreenshot.js:10:15)
at Browser.wrappedCommand (/home/umang/mediawiki/node_modules/devtools/build/devtoolsdriver.js:92:47)
at Object.afterTest (/home/umang/mediawiki/tests/selenium/wdio.conf.js:118:11)
[0-1] Error in "AfterTest Hook"
Protocol error (Page.captureScreenshot): Unable to capture screenshot
[0-1] (node:4148) UnhandledPromiseRejectionWarning: Protocol error (Page.captureScreenshot): Unable to capture screenshot
at Page.<anonymous> (/home/umang/mediawiki/node_modules/puppeteer-core/lib/helper.js:94:19)
at DevToolsDriver.takeScreenshot (/home/umang/mediawiki/node_modules/devtools/build/commands/takeScreenshot.js:10:15)
at Browser.wrappedCommand (/home/umang/mediawiki/node_modules/devtools/build/devtoolsdriver.js:92:47)
at Video.onTestEnd (/home/umang/mediawiki/node_modules/wdio-video-reporter/dist/wdio-video-reporter.js:584:19)
at Video.WDIOReporter.on (/home/umang/mediawiki/node_modules/wdio-video-reporter/node_modules/@wdio/reporter/build/index.js:133:18)
at reporters.forEach.reporter (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:49)
at Array.forEach (<anonymous>)
at BaseReporter.emit (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:20)
at MochaAdapter.emit (/home/umang/mediawiki/node_modules/@wdio/mocha-framework/build/index.js:258:19)
at /home/umang/mediawiki/node_modules/mocha/lib/runner.js:779:14
at done (/home/umang/mediawiki/node_modules/mocha/lib/runnable.js:314:5)
at /home/umang/mediawiki/node_modules/mocha/lib/runnable.js:379:11
[0-1] (node:4148) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[0-1] Error in "Page should be deletable"
Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/umang/mediawiki/tests/selenium/specs/page.js)
[0-1] (node:4148) UnhandledPromiseRejectionWarning: Protocol error (Page.captureScreenshot): Unable to capture screenshot
at Page.<anonymous> (/home/umang/mediawiki/node_modules/puppeteer-core/lib/helper.js:94:19)
at DevToolsDriver.takeScreenshot (/home/umang/mediawiki/node_modules/devtools/build/commands/takeScreenshot.js:10:15)
at Browser.wrappedCommand (/home/umang/mediawiki/node_modules/devtools/build/devtoolsdriver.js:92:47)
at Video.onTestEnd (/home/umang/mediawiki/node_modules/wdio-video-reporter/dist/wdio-video-reporter.js:584:19)
at Video.WDIOReporter.on (/home/umang/mediawiki/node_modules/wdio-video-reporter/node_modules/@wdio/reporter/build/index.js:133:18)
at reporters.forEach.reporter (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:49)
at Array.forEach (<anonymous>)
at BaseReporter.emit (/home/umang/mediawiki/node_modules/@wdio/runner/build/reporter.js:38:20)
at MochaAdapter.emit (/home/umang/mediawiki/node_modules/@wdio/mocha-framework/build/index.js:258:19)
at /home/umang/mediawiki/node_modules/mocha/lib/runner.js:779:14
at done (/home/umang/mediawiki/node_modules/mocha/lib/runnable.js:314:5)
at /home/umang/mediawiki/node_modules/mocha/lib/runnable.js:379:11
(node:4148) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
[0-1]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Page-should-be-deletable.png
[0-1] (node:4148) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
[0-1] (node:4148) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
[0-1] (node:4148) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
[0-1] FAILED in chrome - /tests/selenium/specs/page.js
[0-2] RUNNING in chrome - /tests/selenium/specs/rollback.js
[0-2] PASSED in chrome - /tests/selenium/specs/rollback.js
[0-3] RUNNING in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-3] [16:32:04] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-3]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Special%3ARecentChanges-shows-page-creation.png
[0-3] PASSED in chrome - /tests/selenium/specs/specialrecentchanges.js
[0-4] RUNNING in chrome - /tests/selenium/specs/specialwatchlist.js
[0-4] [16:32:22] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-4]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/Special%3AWatchlist-should-show-page-with-new-edit.png
[0-4] PASSED in chrome - /tests/selenium/specs/specialwatchlist.js
[0-5] RUNNING in chrome - /tests/selenium/specs/user.js
[0-5] [16:32:45] [S] [MWBOT] Login successful: Admin@http://localhost:8080/w
[0-5]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/User-should-be-able-to-create-account.png
[0-5]
Screenshot location: /home/umang/mediawiki/tests/selenium/log/User-should--should-be-able-to-log-in-%40daily.png
[0-5] PASSED in chrome - /tests/selenium/specs/user.js
"dot" Reporter:
......F...........
Spec Files: 5 passed, 1 failed, 6 total (100% completed) in 00:06:39
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ selenium-test: `wdio ./tests/selenium/wdio.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ selenium-test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: