Docker TypeError:Descripte不是一个函数。在Gitlab CI上运行Selenium测试时
我的自动化测试在本地计算机上运行时没有问题,但在尝试在GITLAB CI上运行测试时,遇到了此错误Docker TypeError:Descripte不是一个函数。在Gitlab CI上运行Selenium测试时,docker,selenium-webdriver,automation,gitlab-ci,Docker,Selenium Webdriver,Automation,Gitlab Ci,我的自动化测试在本地计算机上运行时没有问题,但在尝试在GITLAB CI上运行测试时,遇到了此错误 检查是否需要descripe函数var descripe=require('mocha')。在test.js文件中描述。如果您需要test.js中的descripe函数,请将其删除,因为descripe函数是由mocha设置的。假设您通过mocha进行测试,则必须使用mocha命令而不是节点可执行npm来运行测试 Gitlab-ci.yml image: markadams/chromium-
检查是否需要
descripe
函数var descripe=require('mocha')。在test.js
文件中描述。如果您需要test.js
中的descripe
函数,请将其删除,因为descripe
函数是由mocha设置的。假设您通过mocha进行测试,则必须使用mocha命令而不是节点可执行npm来运行测试
Gitlab-ci.yml
image: markadams/chromium-xvfb-js:7
stages:
- build
- test
cache: paths:
- node_modules/
before_script:
- chmod 0777 ./node_modules/.bin/mocha
install_dependencies: stage: build script:
- npm install
- npm install mocha -g
test_with_lab: stage: test script: npm test