Hi, hoping that some light can be shed on using a selenium standalone server within drone 0.8 alongside CodeceptJS.
I’ve seen the examples at drone demos and drone documentation, but am either missing something or CodeceptJS works differently.
CodeceptJS layers on top of WebDriverIO (or others), and I successfully have it running in an example project here. However, in my work project I am unable to get things connected in drone.
I have a drone.yml
that looks similar to this:
pipeline:
install-and-build:
<<: *node_lts_carbon_build
commands:
- npm install
- npm run build
e2e-firefox:
<<: *node_lts_carbon_build
group: checks
commands:
- npm run server &
- npm run test:e2e:firefox
services:
selenium:
image: selenium/standalone-firefox:3.12.0-americium
and a CodeceptJS config file that looks like this:
const firefoxConfig = Object.assign({}, defaultConfig,
{
helpers: {
WebDriverIO: {
url: 'http://localhost:5000',
// host: 'selenium-firefox', -> this was the name of the container in docker-compose, obv doesn't exist here
// host: 'selenium', -> this is the name of the drone service
// seleniumAddress: 'http://selenium:4444/wd/hub', -> when running on browserstack this property is set as the browserstack address, but not for local or docker, tried pointing to selenium
browser: 'firefox',
smartWait: 5000,
restart: false,
waitForTimeout: 60000,
desiredCapabilities: {
moz: {
headless: true,
},
},
},
},
},
);
exports.config = firefoxConfig;
As you can see, I can’t get the configuration right so that the selenium service can be used, not sure what I am missing?
When trying host: 'selenium'
the result is:
Error: connect ECONNREFUSED 127.0.0.1:4444