Modify the GitLab recipe to use Headless Chromium
See original GitHub issueWhat is your Scenario?
We run our tests on gitlabci using the official docker image testcafe/testcafe:1.16.0 and all is fine. Tests are executed behind the proxy. We tried to switch to a more fresh version 1.18.3 (changed only docker tag) but this resulted in the pipeline failure, tests are not executed and we see the next error:
ERROR Cannot establish one or more browser connections.
1 of 1 browser connections have not been established:
- chromium --start-maximized --incognito
Hints:
- Increase the value of the "browserInitTimeout" option if it is too low (currently: 2 minutes for local browsers and 6 minutes for remote browsers). This option determines how long TestCafe waits for browsers to be ready.
- The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.```
- >
/opt/testcafe/docker/testcafe-docker.sh "chromium --start-maximized --incognito"
-c 1
e2e/tests/*.test.ts
--skip-js-errors --color
--reporter spec,xunit:e2e/tests/reports/index.xml,html:e2e/tests/reports/index.html
--video e2e/tests/reports/video
--video-options singleFile=false,failedOnly=true,pathPattern='${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}'.mp4
-s takeOnFails=true,path=e2e/tests/reports/screenshots,fullPage=true,pathPattern='${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}'.png
--page-load-timeout 90000
--assertion-timeout 60000
--proxy $CODE_PROXY_HOST:$CODE_PROXY_PORT
--page-request-timeout 60000
-q attemptLimit=2,successThreshold=1
### What is the Current behavior?
Tests did not run
### What is the Expected behavior?
Tests are executed
### What is your public website URL? (or attach your complete example)
----
### What is your TestCafe test code?
any
### Your complete configuration file
no file
### Your complete test report
_No response_
### Screenshots
_No response_
### Steps to Reproduce
1. Run any test in docker v1.18.3
### TestCafe version
1.18.3
### Node.js version
-
### Command-line arguments
- > /opt/testcafe/docker/testcafe-docker.sh "chromium --start-maximized --incognito" -c 1 e2e/tests/*.test.ts --skip-js-errors --color --reporter spec,xunit:e2e/tests/reports/index.xml,html:e2e/tests/reports/index.html --video e2e/tests/reports/video --video-options singleFile=false,failedOnly=true,pathPattern='${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}'.mp4 -s takeOnFails=true,path=e2e/tests/reports/screenshots,fullPage=true,pathPattern='${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}'.png --page-load-timeout 90000 --assertion-timeout 60000 --proxy $CODE_PROXY_HOST:$CODE_PROXY_PORT --page-request-timeout 60000 -q attemptLimit=2,successThreshold=1
### Browser name(s) and version(s)
chromium
### Platform(s) and version(s)
-
### Other
-
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:20 (1 by maintainers)
Top Results From Across the Web
How GitLab switched to Headless Chrome for testing
We now have a truly accurate way to test GitLab within a real, modern browser. The switch has improved our ability to write...
Read more >How to run headless Chrome in Gitlab - java - Stack Overflow
I'm new to Gitlab CI, and can't seem to find a solution to running my tests on a headless Chrome browser inside of...
Read more >How to setup Chrome Headless on GitLab CI with Puppeteer ...
Instead, we need to use Headless Chrome: a browser without an UI. Puppeteer is a handy Node library made by Google to control...
Read more >Getting Started with Headless Chrome - Chrome Developers
Can I use this with Selenium / WebDriver / ChromeDriver? Yes. See Using Selenium, WebDrive, or ChromeDriver. How is this related to PhantomJS?...
Read more >Headless - QA Automation Expert
To use GitLab CI/CD, we need to keep 2 things in mind: a) Make sure a runner is available in GitLab to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve tried with “chromium --no-sandbox --disable-dev-shm-usage” but that does not help, still getting the same error.
I have this problem too, but unfortunately I can’t share it, --no-sandbox --disable-dev-shm-usage do not help, forfox is ok,but not stabilization