You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been struggling to get Drupal Nightwatch tests running at all, but this appears to be a bug worth sharing:
If I start running tests, and ^C before they finish, the web container will never connect to the selenium-chrome container again until I ddev restart.
Copy/Pasted output for search-ability:
andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js
[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
ℹ Connected to selenium-chrome on port 4444 (585ms).
Using: chrome (101.0.4951.41) on LINUX.
ℹ Loaded url http://web in 181ms
Running Test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
ℹ Loaded url http://web/test-page in 263ms
✔ Element <body> was visible after 53 milliseconds.
✔ Testing if element <body> contains text 'Test page text' (59ms)
✨ PASSED. 2 assertions. (443ms)
Running Page objects test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
ℹ Loaded url http://web/test-page in 142ms
✔ Element <body> was visible after 34 milliseconds.
✔ Testing if element <Element [name=@body]> contains text 'Test page text' (28ms)
✔ Ensuring no deprecation errors have been triggered (11ms)
✨ PASSED. 3 assertions. (292ms)
^C
andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js
[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
⠹ Connecting to selenium-chrome on port 4444...
Error
POST http://selenium-chrome:4444 /wd/hub/session - ECONNRESET
Error: socket hang up
at Socket.socketCloseListener (node:_http_client:467:25)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
⠧ Connecting to selenium-chrome on port 4444...
^C
andy@drupal-tests-web:/var/www/html/core$
I'll also leave a screenshot version in case people prefer reading with the color-coded outputs:
The text was updated successfully, but these errors were encountered:
andy-blum
changed the title
Connection fails when if tests are not allowed to complete
Connection fails if tests are not allowed to complete
Apr 13, 2023
I'm seeing the same issue with other types of tests too (not just Nightwatch), and if you connect via noVNC you'll likely see the browser still sitting there waiting (or you may just see the desktop wallpaper if the browser crashed).
My knowledge and experience is not strong in this area but would adding a health check help? If I can find some time, I will look into that.
I've been struggling to get Drupal Nightwatch tests running at all, but this appears to be a bug worth sharing:
If I start running tests, and
^C
before they finish, the web container will never connect to the selenium-chrome container again until Iddev restart
.Copy/Pasted output for search-ability:
I'll also leave a screenshot version in case people prefer reading with the color-coded outputs:
The text was updated successfully, but these errors were encountered: