TestProject Forum
Powered by leading experts in the test automation community

Execute tests on TestProject docker agent

Hi,

I used TestProject SDK to execute tests. My TestProject agent docker is started successfully with IP address is 172.31.0.4 and when I used this address from SDK it throws me this error:

io.testproject.sdk.internal.exceptions.AgentConnectException: Failed communicating with the Agent at http://172.31.0.4:8585
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 172.31.0.4:8585 [/172.31.0.4] failed: Connect timed out
Caused by: java.net.SocketTimeoutException: Connect timed out

My code:
driver = new ChromeDriver(new URL("http://172.31.0.4:8585"), new ChromeOptions());

So which kind of address should I use to execute tests from SDK on docker agent?

Hello @npvinh140589.

You’ve configured the URL properly, however some additional steps are required such as forwarding the port and configuring some environment variables.
Please refer to the TestProject SDK and Docker Agent section in our DockerHub Page.
https://hub.docker.com/r/testproject/agent