[英]How do I install the XCUITest runner app and ipa on a real device and get the results?
How do I install the XCUITest runner app and ipa on a real device and get the results?如何在真实设备上安装 XCUITest runner 应用程序和 ipa 并获取结果?
I have a runner.app that was generated by building it for testing, and a deployed/signed.ipa.我有一个 runner.app 是通过构建它进行测试而生成的,还有一个 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.现在我想要发生的是将它安装在真实设备上,执行它并获取设备日志。
You can try to use:您可以尝试使用:
xcodebuild test-without-building -xctestrun somepath/YourAppName_iphoneos14.4-arm64.xctestrun -destination 'platform=iOS, id=some_id'
I moved YourAppName_iphoneos14.4-arm64.xctestrun
, YourAppName.app
, YourAppNameUITests-Runner.app
to some local folder from a regular Library/Developer/etc..
build folder.我将
YourAppName_iphoneos14.4-arm64.xctestrun
、 YourAppName.app
、 YourAppNameUITests-Runner.app
从常规Library/Developer/etc..
etc..build 文件夹移动到某个本地文件夹。 Then I opened *.xctestrun
file, which is an xml file, and modified paths to my local folder manually.然后我打开
*.xctestrun
文件,这是一个xml文件,并手动修改本地文件夹的路径。
I couldn't find any official information about it but it seems like the *.xctestrun
file is used by xcodebuild
in order to find all relevant artefacts ie both app folders.我找不到关于它的任何官方信息,但
xcodebuild
似乎使用*.xctestrun
文件来查找所有相关的人工制品,即两个应用程序文件夹。 I would guess that's how they manage to run tests just with app's or ipa's without source code on various clouds...我猜想这就是他们如何设法在各种云上没有源代码的情况下仅使用应用程序或 ipa 运行测试......
PS.附言。 The question was about IPA , but it's convertible to the app, right?
问题是关于IPA的,但它可以转换为应用程序,对吧? At least there is a thread - How to convert.ipa to.app file?
至少有一个线程 - How to convert.ipa to.app file?
Edited with answer... 编辑答案...
It is possible to achieve this. 有可能实现这一目标。 In order to build an ipa of the UI Testing app bundle you can follow these steps:
为了构建UI测试应用程序捆绑包的ipa,您可以按照以下步骤操作:
Find [your_ui_test_bundle_name].app file in Derived Data. 在派生数据中找到[your_ui_test_bundle_name] .app文件。
Create a directory named Payload case sensitive and it must be named this. 创建一个名为目录有效载荷大小写敏感的,它必须被命名此。
Now you have you UI test bundle application saved as an ipa. 现在,您已将UI测试包应用程序另存为ipa。 You can also upload this ipa to a device manually in Xcode via the following process (bonus info, yay!)
您还可以通过以下过程将此ipa手动上传到Xcode中的设备(奖励信息,是的!)。
Credit where it is due: https://medium.com/ios-os-x-development/how-to-run-your-iphone-test-on-aws-device-farm-98f18086811e 信用到期日: https : //medium.com/ios-os-x-development/how-to-run-your-iphone-test-on-aws-device-farm-98f18086811e
您可以使用bundleId:
let app = XCUIApplication(bundleIdentifier: "yourapp.bundle.id")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.