Jump to content

Talk:Selenium/How-to/Run tests using Fresh

Add topic
From mediawiki.org
Latest comment: 6 years ago by ZFilipin (WMF) in topic Error with dependency wdio-mediawiki

Chromedriver

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The example on the page doesn't work for me. After running fresh-node and then npm ci && npm run selenium I get:

chromedriver running with PID 110 Starting ChromeDriver 71.0.3578.80 on port 4444 Only local connections are allowed. [1569232858.798][SEVERE]: bind() returned an error, errno=99: Cannot assign requested address (99)

And later during test execution:

connect ECONNREFUSED 127.0.0.1:8080 KHarlan (WMF) (talk) 10:07, 23 September 2019 (UTC)Reply

@KHarlan (WMF) Is 127.0.0.1:8080 the address of MW_SERVER?
I suspected at first that maybe the Docker networking layer requires a hostname (even just "localhost") to go from the container to the outside, but that's not the case. I'm able to reach the Nginx server from mwddd within the Fresh container by using 127.0.0.1:8080.
Can you try the following?
host$ echo "$MW_SERVER"
host$ curl 127.0.0.1:8080 | head
host$ fresh-node -net -root
nobody@instance$ apt-get update && apt-get install curl
nobody@instance$ curl 127.0.0.1:8080 | head
Krinkle (talk) 16:40, 23 September 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error with dependency wdio-mediawiki

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I can't get this example working, everything went fine until I run npm ci, then I get this error:

ENOENT: no such file or directory, symlink '../tests/selenium/wdio-mediawiki' -> '/mediawiki/node_modules/wdio-mediawiki'


However, the directory tests/selenium/wdio-mediawiki is present. I really don't understand why it's failing.

Tjanks in advance 130.251.216.189 (talk) 15:26, 3 February 2020 (UTC)Reply

Hi! I was not able to reproduce the problem. I've followed instructions from the page, and tests run just fine. Could you please try again and post the entire terminal output, including installing dependencies?
The best way to report the problem would be via Phabricator at https://phabricator.wikimedia.org/. Please add zeljkofilipin to subscribers when creating the task. ZFilipin (WMF) (talk) 13:37, 18 February 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.