当前位置:   article > 正文

软件测试 | Capability_xcodesigningid怎么获取

xcodesigningid怎么获取

真机使用的 Capability

模拟器不同,真机测试需要如下的 Capability

方式一:设置 App 路径,启动 App(自动安装 App)

  1. {
  2. "app": "/Users/seveniruby/Library/Developer/Xcode/DerivedData/UICatalogftyzdbgapjmxxobezrnrxsshpdqh/Build/Products/Debug-iphoneos/UICatalog.app",
  3. "automationName": "XCUITest",
  4. "platformName": "ios",
  5. "xcodeOrgId": "xxxxxx",
  6. "xcodeSigningId": "iPhone Developer",
  7. "udid": "9df22446af15919c494c85b4c1c8b00eaa3a5bd0"
  8. }

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

  1. {
  2. "platformName": "ios",
  3. "bundleId": "com.example.apple-samplecode.UICatalog",
  4. "automationName": "XCUITest",
  5. "deviceName": "iPhone",
  6. "udid": "auto",
  7. "xcodeOrgId": "xxxxx",
  8. "xcodeSigningId": "iPhone Developer"
  9. }
  • app : Xcode选择真机编译后的app位置
  • bundled:每个App的标识,相当于Android App的appPackage
  • xcodeOrgId:Team ID,获取方法详见https://ceshiren.com/t/tipic/11539
  • udid:auto会根据deviceName返回的参数自动获取udid

注意:编译成功后需要在手机里信任证书

使用Appium Desktop验证环境

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

常见问题

问题一

Failed to register bundle identifier

  • 原因:bundle identifier 有重复
  • 解决方法:修改为唯一的即可

问题二

执行 instruments -s devices 命令报错: Hogwarts $ instruments -s devices xcode-select: error: tool 'instruments' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  • 原因:安装了 Xcode,但是不在系统默认的目录下。
  • 解决方法:需要把 Xcode 的路径修改为你安装的位置,可以在终端里面用命令修改,执行命令 sudo xcode-select --switch /Applications/Xcode.app

问题三

运行脚本过程中,手动停止脚本时,偶尔会报错 Showing All Messages WebDriverAgentRunnerRunner.app (3413) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying error: The test runner exited with code 74 before checking in.))

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

问题四

  1. note: Using new build system
  2. note: Building targets in parallel
  3. note: Planning build
  4. note: Constructing build description
  5. error: No signing certificate "iOS Development" found: No "iOS Development"
  6. signing certificate matching team ID "L62JHCGMQW" with a private key was found.
  7. (in target 'WebDriverAgentLib' from project 'WebDriverAgent')
  8. error: No profiles for 'com.facebook.WebDriverAgentRunner.xctrunner' were found:
  9. Xcode couldn't find any iOS App Development provisioning profiles matching
  10. 'com.facebook.WebDriverAgentRunner.xctrunner'. Automatic signing is disabled and
  11. unable to generate a profile. To enable automatic signing, pass -
  12. allowProvisioningUpdates to xcodebuild. (in target 'WebDriverAgentRunner' from
  13. project 'WebDriverAgent')
  • 原因:更换手机后,未重新build:
  • 解决方法:更换手机后重新build WDA,然后点击test安装wda

问题五

  1. Assertions: System: Early unexpected exit, operation never finished
  2. bootstrapping - no restart will be
  3. attempted. (Underlying Error: The test runner exited with code 74 before
  4. checking in. If you believe this
  5. error represents a bug, please attach the result bundle at
  6. /Users/dzkair/Library/Developer/Xcode/DerivedData/WebDriverAgentalwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/TestWebDriverAgentRunner-2020.11.26_10-47-38-+0800.xcresult)
  • 解决方法:重新拔掉手机即可

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/314340
推荐阅读
相关标签
  

闽ICP备14008679号