iOS自动化测试测试员的那点事测试开发

Appium启动iOS && Android自动

2018-09-25  本文已影响4人  沈宥

上篇文章有详细讲解appium的环境配置

这篇直接讲解 iOS 和 Android 的运行,后续会再更新脚本相关

需要配置Appium的启动相关参数:
官网超详细参数配置及其含义

iOS配置:

{
  "platformVersion": "11.2.6",
  "deviceName": "iPhone",
  "platformName": "iOS",
  "udid": "手机udid",
  "bundleId": "APP bundleid",
  "automationName": "XCUITest",
  "xcodeSigningId": "iPhone Developer",
  "xcodeOrgId": "10位校验码",
  "showIOSLog": "true",
  "preventWDAAttachments": "false"
}
C6A65838-49AD-4297-872A-1F471CD316A2.png A336B764865B54E3B6052376C1535718.png

启动成功界面:


Screen Shot 2018-09-18 at 6.45.51 PM.png

Android配置:

{
  "platformName": "Android",
  "deviceName": "MI_5s_Plus",
  "newCommandTimeout": 180,
  "udid": "设备号",
  "appActivity": "要启动的 Android acticity",
  "appPackage": "包名",
  "autoGrantPermissions": true
}

appActivity和appPackage可通过
adb shell dumpsys activity activities
命令行获取

例如结果中含有:cmp=com.Qunar/com.mqunar.hy.browser.HyMainActivity
则:

appPackage:com.Qunar
appActivity:com.mqunar.hy.browser.HyMainActivity
8B648255F2F5EFC60DCDAF053C81EF0D.png

启动成功界面:


AA9C062B-03DF-4095-AC7D-7A6D070DEC80.png
上一篇下一篇

猜你喜欢

热点阅读