I am developing a Vue.js app for a website frontend.
For this app I would like to use Unit and E2E tests. I built my project with vue-cli.
From my understanding, vue-cli uses Karma for unit tests and Nightwatch + Selenium for E2E tests.
My .gitlab-ci.yml
looks like the following:
stages:
- test
test:express:
image: node:boron
stage: test
script:
- cd backend/
- npm install --progress=false
- ./node_modules/.bin/jasmine
test:vue:
image: node:boron
stage: test
script:
- cd frontend/
- npm install --progress=false
- npm test
npm test
runs e2e and unit tests and works on local computers. The Unit tests run smoothly and the Selenium brings up a Chrome window and uses the E2E tests.
The problem is that don't know how to run E2E Selenium tests on GitLab CI. It keeps giving me an error saying:
Could not connect to Selenium Server. Have you started the Selenium Server yet?
, although it says two lines before that it has already created a Selenium server.
How can I run E2E Selenium tests on GitLab CI? If this is not achievable, what kind of E2E can I run on GitLab CI?