如何使用GitLab CI设置Selenium E2Etesting?
我正在开发一个网站前端的Vue.js应用程序。
对于这个应用程序,我想使用单元和E2Etesting。 我用vue-cli构build了我的项目。
根据我的理解,vue-cli使用Karma进行unit testing,使用Nightwatch + Selenium进行E2Etesting。
我的.gitlab-ci.yml
如下所示:
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
运行e2e和unit testing,并在本地计算机上运行。 unit testing运行顺利,Selenium调出Chrome窗口并使用E2Etesting。
问题是不知道如何在GitLab CI上运行E2E Seleniumtesting。 它不断给我一个错误说:
Could not connect to Selenium Server. Have you started the Selenium Server yet?
,虽然之前说两行已经创build了Selenium服务器。
我如何在GitLab CI上运行E2E Seleniumtesting? 如果这是不可行的,我可以在GitLab CI上运行什么types的E2E?
- Gitlab CI中使用Docker runner的代理问题
- 用python tempfile.mkdtemp在gitlab-ci docker中创buildPbs
- 迁移时,Gitlab CI和Docker会引发错误
- 清理githost托pipe的gitlab-ci运行器中晃来晃去的Docker容器?
- 如何访问docker图像中的mongorestore / mongodump
- Gitlab CI / CD转轮和docker连接configuration
- GitlabCI编译失败,docker.sock:write:破pipe道
- Docker / CI:访问在另一个阶段创build的nodeJS应用程序
- Gitlab CI runner无法在docker执行程序上共享生成源