iOS自动化真机测试验证环境过程中常见问题解析

举报
橙子_hogwarts 发表于 2022/05/29 15:40:00 2022/05/29
【摘要】 本章节主要讲解 iOS 自动化真机配置以及在 iOS 真机执行自动化时常见问题与解决方法。真机使用的Capability与模拟器不同,真机测试需要如下的 Capability方式一:设置 App 路径,启动 App(自动安装 App){ "app": "/Users/seveniruby/Library/Developer/Xcode/DerivedData/UICatalog-ftyzd...

本章节主要讲解 iOS 自动化真机配置以及在 iOS 真机执行自动化时常见问题与解决方法。

真机使用的Capability

与模拟器不同,真机测试需要如下的 Capability
方式一:设置 App 路径,启动 App(自动安装 App)

{
  "app": "/Users/seveniruby/Library/Developer/Xcode/DerivedData/UICatalog-ftyzdbgapjmxxobezrnrxsshpdqh/Build/Products/Debug-iphoneos/UICatalog.app",
  "automationName": "XCUITest",
  "platformName": "ios",
  "xcodeOrgId": "xxxxxx",
  "xcodeSigningId": "iPhone Developer",
  "udid": "9df22446af15919c494c85b4c1c8b00eaa3a5bd0"
}

方式二:根据 App 包名启动 App

{
  "platformName": "ios",
  "bundleId": "com.example.apple-samplecode.UICatalog",
  "automationName": "XCUITest",
  "deviceName": "iPhone",
  "udid": "auto",
  "xcodeOrgId": "xxxxx",
  "xcodeSigningId": "iPhone Developer"
}

使用Appium Desktop验证环境


以上步骤完成后,出现下图表示真机环境配置成功



常见问题

问题一
问题二

问题三

  • 解决方法:重启手机或者拔掉 IOS 数据线,重新连接电脑

问题四

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "L62JHCGMQW" with a private key was found. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
error: No profiles for 'com.facebook.WebDriverAgentRunner.xctrunner' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.facebook.WebDriverAgentRunner.xctrunner'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')

问题五

Assertions: System: Early unexpected exit, operation never finished bootstrapping - no restart will be
attempted. (Underlying Error: The test runner exited with code 74 before checking in. If you believe this
error represents a bug, please attach the result bundle at
/Users/dzkair/Library/Developer/Xcode/DerivedData/WebDriverAgent-
alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2020.11.26_10-47-38-+0800.xcresult)

  • 解决方法:重新插拔手机即可
    常见问题给大家总结了这些,如果大家有遇到其他的问题也可以在下方留言哦~
更多技术干货文章:https://qrcode.ceba.ceshiren.com/link?name=article&project_id=qrcode&from=hwyun&timestamp=1652324005&author=BB

喜欢软件测试的小伙伴们,如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “点赞” “评论” “收藏” 一键三连哦!

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。