Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Selenium] Update selenium to standalone latest version #349

Merged
merged 3 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/vnc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/magento2-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/mftf.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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`.

Expand Down
25 changes: 3 additions & 22 deletions environments/includes/selenium.base.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
version: "3.5"
services:
selenium-hub:
Den4ik marked this conversation as resolved.
Show resolved Hide resolved
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
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}
- ${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