Scenario:
I am facing a situation where I aim to execute Testcafe in docker within a remote environment that necessitates running Testcafe through its command-line interface. I intend to utilize the .testcaferc file that I use for local testing to avoid managing two different sets of configurations. However, I need to make specific property overrides to ensure it runs smoothly in this setup.
In particular, I use chrome
locally and chromium:headless
in the pipeline.
The Issue:
I am struggling to find a way to override the browsers when using the CLI tool - while I can successfully override every other parameter, changing the browser seems to be challenging.
Sample CLI command:
testcafe \
chromium:headless \
--ports 1337,1338 \
--disable-gpu-sandbox \
--disable-gpu \
--no-sandbox \
--disable-dev-shm-usage \
...
Sample .testcaferc.json:
{
"browsers": ["chrome"],
...
}
Expected Outcome:
It should only run with chromium:headless
Actual Result:
It fails when trying to run with chrome