I am able to run the tests fine for the first test class in my testNg runner xml. However, it throws this error as soon as the first test method starts in the second class. The desired capabilities and preferences are the same for all tests in my test suite.
I have tried several combinations of --maxDockerSeleniumContainers 6 --desiredContainers 1 --maxTestSessions 100. It does not make any difference. Am I missing something basic here? I read most issues related error in forwarding. However, I could not find any exactly the same. In my case, seems like Hub fails to forward requests starting from test method in second class listed in TestNG XML. It doesn't matter what the order I execute tests and if how many methods the first class has. It only forwards requests successfully for tests in the first class. As soon as the second class starts executing within a second it fails all tests at once although it is supposed to run in sequence.
To Reproduce
start Zalenium on Linux machine using the command given below.
Create at least two test classes with test methods and run using testNg runner xml
Expected behavior
It should be able to run tests from different classes in on test run
Test script reproducing this issue (when applicable)
🐛 Bug Report
I am able to run the tests fine for the first test class in my testNg runner xml. However, it throws this error as soon as the first test method starts in the second class. The desired capabilities and preferences are the same for all tests in my test suite.
Error forwarding the new session cannot find : Capabilities {browserName: chrome, goog:chromeOptions: {args: [--window-size=1920,1080, --disable-notifications, --no-sandbox], extensions: [], prefs: {download.prompt_for_download: true}}, name: testEmployeePageLink, platform: LINUX} Command duration or timeout: 115 milliseconds Build info: version: '3.141.59',
I have tried several combinations of --maxDockerSeleniumContainers 6 --desiredContainers 1 --maxTestSessions 100. It does not make any difference. Am I missing something basic here? I read most issues related error in forwarding. However, I could not find any exactly the same. In my case, seems like Hub fails to forward requests starting from test method in second class listed in TestNG XML. It doesn't matter what the order I execute tests and if how many methods the first class has. It only forwards requests successfully for tests in the first class. As soon as the second class starts executing within a second it fails all tests at once although it is supposed to run in sequence.
To Reproduce
Expected behavior
It should be able to run tests from different classes in on test run
Test script reproducing this issue (when applicable)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
Environment
OS: Linux 3.10.0-957.5.1.el7.x86_64 Zalenium Image Version(s): Latest Docker version: 19.03.2, build 6a30dfc
Exact Docker command to start the containers sudo docker run --rm -d -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos -e ZALENIUM_EXTRA_JVM_PARAMS="-Dwebdriver.http.factory=apache" -e WAIT_FOR_AVAILABLE_NODES=false --privileged dosel/zalenium:latest start --debugEnabled true --timeZone 'US/Eastern' --maxDockerSeleniumContainers 6 --desiredContainers 1 --maxTestSessions 100