使用以下内容将Status Badge包含在项目的README.md
文件中时
[![Sauce Test Status](https://saucelabs.com/buildstatus/YOUR_SAUCE_USERNAME)](https://saucelabs.com/u/YOUR_SAUCE_USERNAME)
它显示了这个:
而不是:
devDependencies
文件中的相关package.json
:
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.1.1",
"karma-jasmine": "^1.1.0",
"karma-sauce-launcher": "^1.1.0",
karma.conf.js
文件中的相关配置设置:
singleRun: process.env.CI,
sauceLabs: {
testName: 'Web App Tests'
},
customLaunchers: customLaunchers,
reporters: process.env.CI ? ['dots', 'saucelabs'] : ['progress']
答案 0 :(得分:0)
我通过将构建版本添加到karma.conf.js
文件中解决了这个问题:
singleRun: process.env.CI, sauceLabs: { build: require('./package.json').version, // New testName: 'Web App Tests' }, customLaunchers: customLaunchers, reporters: process.env.CI ? ['dots', 'saucelabs'] : ['progress']