PHPUnit Selenium tests fail on the local Docker host and are passed using a public IP address

I am trying to set up an automated test platform using Docker and Selenium Grid. In the diagram below you can see the structure that I am using. At the top is the ubuntu server running on the Compute Engine. On the left is a docker container running on ubuntu 14.04. The container runs our project on a local host: 8080 with Google App Engine. On the right is the Selenium Hub with two nodes operating on port 4444.

Selenium setup

From the host to the docker there is port migration, as well as a selenium node. At 32772 and 32768, respectively.

When running Selenium tests, I send them to the hub, which in turn will run the tests on the local docker host. My problem is that when I tell the hub to run tests on 172.17.0.2:8080, it opens the launch screen, but it cannot send any forms. When I submit the form, the text areas are cleared. How the page is refreshed somehow. The strange thing is that when I tell the hub to use the external host ip and docker port, like this xx.xx.xx.xx: 32772, it works. And it has all the functionality. However, for performance and automation reasons, I would like to run it in the internal ip address.

Any help would be appreciated.

Tijn

+4
1

.ENV . IP- ip-. , - , .

+1

Source: https://habr.com/ru/post/1652338/


All Articles