From 6072e43aa16cab7698e3b732d6e0ebb718626f21 Mon Sep 17 00:00:00 2001 From: Denis Kopylov Date: Thu, 15 Apr 2021 07:53:00 +0300 Subject: [PATCH 1/3] [Env] Update selenium to standalone latest version --- environments/includes/selenium.base.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/environments/includes/selenium.base.yml b/environments/includes/selenium.base.yml index 50125bfd..f507b7e8 100644 --- a/environments/includes/selenium.base.yml +++ b/environments/includes/selenium.base.yml @@ -1,27 +1,8 @@ version: "3.5" services: - selenium-hub: - container_name: ${WARDEN_ENV_NAME}_selenium-hub - hostname: selenium-hub - image: selenium/hub:latest - healthcheck: - test: /opt/bin/check-grid.sh --host 0.0.0.0 --port 4444 - interval: 20s - retries: 3 - environment: - GRID_TIMEOUT: 0 - GRID_BROWSER_TIMEOUT: 0 - selenium-chrome: hostname: ${WARDEN_ENV_NAME}_selenium-chrome - image: selenium/node-chrome${WARDEN_SELENIUM_DEBUG:-}:3.8.1 + image: selenium/standalone-chrome${WARDEN_SELENIUM_DEBUG:-}:latest extra_hosts: - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} - ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} - depends_on: - - selenium-hub - environment: - - HUB_HOST=selenium-hub - - HUB_PORT=4444 - - START_XVFB=false - From c8091e79676e4642a32bbdb5db5d2f1ede838f95 Mon Sep 17 00:00:00 2001 From: Denis Kopylov Date: Fri, 23 Apr 2021 10:33:41 +0300 Subject: [PATCH 2/3] Update environments/includes/selenium.base.yml Co-authored-by: David Alger --- environments/includes/selenium.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/includes/selenium.base.yml b/environments/includes/selenium.base.yml index f507b7e8..33def7f2 100644 --- a/environments/includes/selenium.base.yml +++ b/environments/includes/selenium.base.yml @@ -2,7 +2,7 @@ version: "3.5" services: selenium-chrome: hostname: ${WARDEN_ENV_NAME}_selenium-chrome - image: selenium/standalone-chrome${WARDEN_SELENIUM_DEBUG:-}:latest + image: selenium/standalone-chrome${WARDEN_SELENIUM_DEBUG:-}:${WARDEN_SELENIUM_VERSION:-3.141.59} extra_hosts: - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} - ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} From 0fa108336cb1773890818c76a4714df94831f60d Mon Sep 17 00:00:00 2001 From: Denis Kopylov Date: Sun, 25 Apr 2021 05:05:29 +0300 Subject: [PATCH 3/3] Update container name | Update docs --- commands/vnc.cmd | 2 +- docs/configuration/magento2-testing.md | 4 ++-- docs/configuration/mftf.md | 4 ++-- environments/includes/selenium.base.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/commands/vnc.cmd b/commands/vnc.cmd index 5dd2b270..31296c6e 100644 --- a/commands/vnc.cmd +++ b/commands/vnc.cmd @@ -9,7 +9,7 @@ if [[ ${WARDEN_SELENIUM} -ne 1 ]] || [[ ${WARDEN_SELENIUM_DEBUG} -ne 1 ]]; then fi WARDEN_SELENIUM_INDEX=${WARDEN_PARAMS[0]:-1} -WARDEN_SELENIUM_VNC=${WARDEN_ENV_NAME}_${WARDEN_PARAMS[1]:-selenium-chrome}_${WARDEN_SELENIUM_INDEX} +WARDEN_SELENIUM_VNC=${WARDEN_ENV_NAME}_${WARDEN_PARAMS[1]:-selenium}_${WARDEN_SELENIUM_INDEX} if ! which remmina >/dev/null; then EXPOSE_PORT=$((5900 + WARDEN_SELENIUM_INDEX)) diff --git a/docs/configuration/magento2-testing.md b/docs/configuration/magento2-testing.md index 1dcdb2b1..9568d085 100644 --- a/docs/configuration/magento2-testing.md +++ b/docs/configuration/magento2-testing.md @@ -298,7 +298,7 @@ To run Acceptance tests you need to [configure the MFTF environment](mftf.md). O - `MAGENTO_BASE_URL` - `MAGENTO_BACKEND_NAME` to your Backend path (Check with `bin/magento info:adminuri`) - `MAGENTO_ADMIN_USERNAME` and `MAGENTO_ADMIN_PASSWORD` - - `SELENIUM_HOST` (by default it is `selenium-hub`) + - `SELENIUM_HOST` (by default it is `selenium`) Sample configuration ``` @@ -309,7 +309,7 @@ To run Acceptance tests you need to [configure the MFTF environment](mftf.md). O BROWSER=chrome MODULE_WHITELIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProductCatalogSearch ELASTICSEARCH_VERSION=7 - SELENIUM_HOST=selenium-hub + SELENIUM_HOST=selenium ``` More details can be found [in Magento DevDocs](https://devdocs.magento.com/mftf/docs/configuration.html). diff --git a/docs/configuration/mftf.md b/docs/configuration/mftf.md index 69693d4d..8e67594f 100644 --- a/docs/configuration/mftf.md +++ b/docs/configuration/mftf.md @@ -11,7 +11,7 @@ WARDEN_SELENIUM=1 After generating MFTF configuration files (`dev/tests/acceptance/.env` generated by `vendor/bin/mftf setup:env` command), you need to provide selenium hostname: ``` -SELENIUM_HOST=selenium-hub +SELENIUM_HOST=selenium BROWSER=chrome ``` @@ -43,7 +43,7 @@ To preview the process of testing, you need any **VLC** client that provides **S To preview the process in Mac OS X, you must first create an SSH tunnel to the docker instance hosting the VNC server. That would look something like: - ssh -N -L localhost:5901:magento2_selenium-chrome_1:5900 tunnel.warden.test + ssh -N -L localhost:5901:magento2_selenium_1:5900 tunnel.warden.test Where `5901` is the port on your local computer you want to use to access the VNC server. Then, using Finder you can "Go > Connect to Server" `vnc://localhost:5901`. diff --git a/environments/includes/selenium.base.yml b/environments/includes/selenium.base.yml index 33def7f2..313ea6f5 100644 --- a/environments/includes/selenium.base.yml +++ b/environments/includes/selenium.base.yml @@ -1,7 +1,7 @@ version: "3.5" services: - selenium-chrome: - hostname: ${WARDEN_ENV_NAME}_selenium-chrome + selenium: + hostname: ${WARDEN_ENV_NAME}_selenium image: selenium/standalone-chrome${WARDEN_SELENIUM_DEBUG:-}:${WARDEN_SELENIUM_VERSION:-3.141.59} extra_hosts: - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}