如何在真实设备上安装 XCUITest runner 应用程序和 ipa 并获得结果? [英] How do I install the XCUITest runner app and ipa on a real device and get the results?

查看:74
本文介绍了如何在真实设备上安装 XCUITest runner 应用程序和 ipa 并获得结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在真实设备上安装 XCUITest runner 应用程序和 ipa 并获取结果?

How do I install the XCUITest runner app and ipa on a real device and get the results?

我有一个 runner.app,它是通过构建用于测试而生成的,以及一个已部署/签名的 .ipa.

I have a runner.app that was generated by building it for testing, and a deployed/signed .ipa.

现在我想将它安装在真实设备上,执行它并获取设备日志.

Now what I would like to happen is to have it installed on a real device, execute it, and get the device log.

推荐答案

Edited with answer...

Edited with answer...

有可能实现这一目标.要构建 UI 测试应用程序包的 ipa,您可以按照以下步骤操作:

It is possible to achieve this. In order to build an ipa of the UI Testing app bundle you can follow these steps:

  1. 打开包含在 Xcode 中的项目.
  2. 在方案旁边选择您要为其构建 ipa 的设备.这可以是实际设备或模拟器.
  3. 产品 > 构建 > 测试
  4. 在派生数据中查找 [your_ui_test_bundle_name].app 文件.

  • 派生数据默认位于~/Library/Developer/Xcode/DerivedData/
  • 要找到此文件,请深入到您的项目的 DerivedData,导航到 Build > Products,然后根据您在第 2 步中选择的内容找到相应的目录.如果您选择模拟器,在 -iphonesimulator/ 中查看,或者如果您选择在 -iphoneos/ 中查看设备.UI 测试包 .app 文件应位于该目录中.
  • Derived data by default is located at ~/Library/Developer/Xcode/DerivedData/
  • To locate this file, dive into DerivedData for your project, navigating to Build > Products and then the respective directory based on what you chose in step 2. If you chose a simulator, look in -iphonesimulator/ or if you chose a device look in -iphoneos/. The UI test bundle .app file should be in that directory.

创建一个名为 Payload 区分大小写的目录,它必须命名为 this.

Create a directory named Payload case sensitive and it must be named this.

现在您已将 UI 测试包应用程序保存为 ipa.您还可以通过以下过程在 Xcode 中手动将此 ipa 上传到设备(奖励信息,是的!)

Now you have you UI test bundle application saved as an ipa. You can also upload this ipa to a device manually in Xcode via the following process (bonus info, yay!)

  1. 窗口 > 设备和模拟器
  2. 选择您连接的设备.
  3. 点按已安装的应用下的+按钮.
  4. 导航到并选择您之前压缩的 UI 测试 .ipa 文件.
  5. 它应该安装到设备上.
  1. Window > Devices and Simulators
  2. Select your connected device.
  3. Tap the + button under Installed Apps.
  4. Navigate to and select your UI test .ipa file that you compressed previously.
  5. It should install onto the device.

信用到期:https://medium.com/ios-os-x-development/how-to-run-your-iphone-test-on-aws-device-farm-98f18086811e

这篇关于如何在真实设备上安装 XCUITest runner 应用程序和 ipa 并获得结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆