I am trying to run my end to end tests (using testcafe) during the CI pipeline of gitlab. However, I am running into the following error:
ERROR The Firefox 52.0.0 / Linux 0.0.0 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.
My .gitlab-ci.yml is as follows:
stages:
- test
before_script:
- apt-get update -yqqq
- apt-get install -y xvfb
- apt-get install iceweasel -yqq
- Xvfb :99 -ac &
- export DISPLAY=:99
test-frontend:
image: node:7.7.4
stage: test
script:
- npm install
- npm install -g [email protected]
- testcafe --list-browsers
- testcafe firefox e2etests/tests/login.test.js
tags:
- vue
So basically I am using a node docker image for my test 'stage' and install xvfb to 'display' a browser.
Output ci gitlab:
npm info ok
$ testcafe --list-browsers
Using locally installed version of TestCafe.
firefox
$ testcafe firefox e2etests/tests/login.test.js
Using locally installed version of TestCafe.
Running tests in:
- Firefox 52.0.0 / Linux 0.0.0
Try to
ERROR The Firefox 52.0.0 / Linux 0.0.0 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.