Context:
I have a situation where I want to run Testcafe in docker in a remote environment which requires Testcafe to be run through its CLI, I want to use the .testcaferc file that I also use to test locally so I don't have to manage 2 sets of config. But need to override specific properties to get it working in this environment.
Notably chrome locally and chromium:headless in the pipeline.
The problem:
I can't figure out how to override the browsers for the CLI tool - I can override every other key just fine, but the browser to run on doesn't get overridden
Example CLI command:
testcafe \
chromium:headless \
--ports 1337,1338 \
--disable-gpu-sandbox \
--disable-gpu \
--no-sandbox \
--disable-dev-shm-usage \
...
Example .testcaferc.json:
{
"browsers": ["chrome"],
...
}
Expected:
Runs only chromium:headless
Actual:
Fails trying to run chrome
This is a known issue: https://github.com/DevExpress/testcafe/issues/6618 We have fixed it in the latest TestCafe release: https://www.npmjs.com/package/testcafe/v/1.19.0
Please update to v1.19.0.