ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure

Viewed 684

Jenkins runs in Linux vm without GUI testcafe@1.9.4 testcafe-reporter-xunit@2.1.0 chromium@3.0.2 node -v v14.2.0

Execute Shell: npm install chromium npm install firefox

npm install testcafe testcafe-reporter-xunit

node_modules/.bin/testcafe "firefox:node_modules/firefox:headless" tests/smokeTest.js -r xunit:res.xml

node_modules/.bin/testcafe "chromium:node_modules/chromium/lib/chromium/chrome-linux/chrome --headless --no-sandbox" tests/smokeTest.js -r xunit:res.xml

Jenkins Job: ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.

Type "testcafe -h" for help. Build step 'Execute shell' marked build as failure Recording test results Finished: FAILURE

1 Answers

Before running tests on a specific browser, it is necessary either to install it into the system, e.g. sudo app install firefox or install a portable browser, e.g. npm install chromium.

In the latter case, you need to ensure that the installation is correct, i.e. the browser's executable exists and all required dependencies are installed. You can use the following command to check the executable's dependencies: ldd node_modules/chromium/lib/chromium/chrome-linux/chrome. Note that if you install the browser into the system with the system package manager, it will install all required dependencies automatically.

Related