我正在使用WebdriverIO将我的Appium测试脚本连接到Browserstack。我的项目结构与这里的示例基本相同:https://github.com/browserstack/webdriverio-appium-app-browserstack/tree/master/ios
使用我们自己的应用程序,测试大约需要 6-9 分钟才能开始。调查视频录制时,应用程序会立即打开,它只是在第一个屏幕上停留几分钟,然后执行命令。
[12:03:32] COMMAND POST "/wd/hub/session"
[12:03:32] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"name":"Sign_Up","build":"PBA_iOS","device":"iPhone 7 Plus","app":"XXXXXXXX","browserstack.debug":true,"requestOrigins":{"url":"http://webdriver.io","version":"4.13.2","name":"webdriverio"}}}
[12:09:20] INFO SET SESSION ID 2be9267fe9bae10f3fef233698954493bb33fdc7
[12:09:20] RESULT {"webStorageEnabled":false,"locationContextEnabled":true,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"han ... (1268 more bytes)
[12:09:20] COMMAND POST "/wd/hub/session/2be9267fe9bae10f3fef233698954493bb33fdc7/elements"
[12:09:20] DATA {"using":"accessibility id","value":"OK"}
[12:09:20] RESULT [{"ELEMENT":"D4CDA7B7-2EC7-422B-AD3C-1BF40E73ECBA"}]
您可以在控制台日志中看到,在发送所需功能后会发生长时间的等待。有没有办法加快速度?
我的 conf 文件:
exports.config = {
user: 'XXXXXXXXXXX',
key: 'XXXXXXXXXXXXXXXXX',
updateJob: false,
specs: [
'./tests/signup.spec.js'
],
exclude: [],
capabilities: [{
name: 'Sign_Up',
build: 'PBA_iOS',
device: 'iPhone 7 Plus',
app: 'XXXXXXXX',
'browserstack.debug': true
}],
logLevel: 'verbose',
coloredLogs: true,
screenshotPath: './errorShots/',
baseUrl: '',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 40000
}
};
万一重要,我仍在试用中(这个问题特别烦人,因为 10 秒的测试用例占用了等待的试用计时器的几分钟(。
如果您的应用程序在启动时弹出一些弹出窗口,这通常会增加启动时间。包括功能等待静止:假,然后重试。