Sauce 服务不适用于移动测试
Sauce service doesn't work with mobile tests
我正在使用 sauce-service
包发送测试名称(功能文件)并在 Sauce Labs
上查看它们,当我使用网络测试时一切正常但不幸的是当我尝试设置移动配置它似乎不起作用。我缺少什么?
我的手机配置:
exports.config = {
...config,
...{
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY,
testobject_api_key: process.env.SAUCE_RDC_ACCESS_KEY,
region: 'eu',
specs: [
'./features/*'
],
maxInstances: 1,
capabilities: [{
deviceName: 'Samsung Galaxy S',
automationName: 'UiAutomator2',
platformName: 'Android',
idleTimeout: 180,
cacheId: new Date().getTime(),
noReset: true,
autoGrantPermissions: true,
orientation: 'PORTRAIT',
newCommandTimeout: 180,
build: 'test',
//name: 'test', <- Hardcoded test name, it should be name from feature file
maxInstances: 1,
}],
services: ['sauce'],
}
}
我的package.json:
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.8",
"@babel/preset-env": "^7.12.7",
"@babel/register": "^7.12.1",
"@rpii/wdio-html-reporter": "^6.3.1",
"@wdio/appium-service": "^7.5.7",
"@wdio/junit-reporter": "^6.3.6",
"@wdio/cli": "^6.9.1",
"@wdio/cucumber-framework": "^6.8.0",
"@wdio/local-runner": "^6.9.1",
"@wdio/mocha-framework": "^6.8.0",
"@wdio/sauce-service": "^6.10.0",
"@wdio/spec-reporter": "^6.8.1",
"@wdio/sync": "^6.9.1",
"babel-plugin-source-map-support": "^2.1.3",
"chromedriver": "^91.0.1",
"mkdirp": "^1.0.4",
"moment": "^2.29.1",
"wdio-chromedriver-service": "^6.0.4",
"wdio-cucumberjs-json-reporter": "^2.0.2",
"wdio-json-reporter": "^2.0.0"
},
包有问题,sauce labs
、webdriverio
,还是其他问题?
非常感谢您的帮助:)
这是 WebdriverIO V6 的一个已知问题,您需要升级到至少版本 7,并且至少升级到版本 7.7.4 的 Sauce Service 才能正常工作。
我正在使用 sauce-service
包发送测试名称(功能文件)并在 Sauce Labs
上查看它们,当我使用网络测试时一切正常但不幸的是当我尝试设置移动配置它似乎不起作用。我缺少什么?
我的手机配置:
exports.config = {
...config,
...{
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY,
testobject_api_key: process.env.SAUCE_RDC_ACCESS_KEY,
region: 'eu',
specs: [
'./features/*'
],
maxInstances: 1,
capabilities: [{
deviceName: 'Samsung Galaxy S',
automationName: 'UiAutomator2',
platformName: 'Android',
idleTimeout: 180,
cacheId: new Date().getTime(),
noReset: true,
autoGrantPermissions: true,
orientation: 'PORTRAIT',
newCommandTimeout: 180,
build: 'test',
//name: 'test', <- Hardcoded test name, it should be name from feature file
maxInstances: 1,
}],
services: ['sauce'],
}
}
我的package.json:
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.8",
"@babel/preset-env": "^7.12.7",
"@babel/register": "^7.12.1",
"@rpii/wdio-html-reporter": "^6.3.1",
"@wdio/appium-service": "^7.5.7",
"@wdio/junit-reporter": "^6.3.6",
"@wdio/cli": "^6.9.1",
"@wdio/cucumber-framework": "^6.8.0",
"@wdio/local-runner": "^6.9.1",
"@wdio/mocha-framework": "^6.8.0",
"@wdio/sauce-service": "^6.10.0",
"@wdio/spec-reporter": "^6.8.1",
"@wdio/sync": "^6.9.1",
"babel-plugin-source-map-support": "^2.1.3",
"chromedriver": "^91.0.1",
"mkdirp": "^1.0.4",
"moment": "^2.29.1",
"wdio-chromedriver-service": "^6.0.4",
"wdio-cucumberjs-json-reporter": "^2.0.2",
"wdio-json-reporter": "^2.0.0"
},
包有问题,sauce labs
、webdriverio
,还是其他问题?
非常感谢您的帮助:)
这是 WebdriverIO V6 的一个已知问题,您需要升级到至少版本 7,并且至少升级到版本 7.7.4 的 Sauce Service 才能正常工作。