Reputation: 2823
How do I install the XCUITest runner app and ipa on a real device and get the results?
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.
Upvotes: 3
Views: 4600
Reputation: 11
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. Then I opened *.xctestrun
file, which is an xml file, and modified paths to my local folder manually.
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 i.e both app folders. I would guess that's how they manage to run tests just with app's or ipa's without source code on various clouds...
PS. The question was about IPA, but it's convertible to the app, right? At least there is a thread - How to convert .ipa to .app file?
Upvotes: 1
Reputation: 741
You can use bundleId :
let app = XCUIApplication(bundleIdentifier: "yourapp.bundle.id")
Upvotes: 1
Reputation: 1203
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:
Find [your_ui_test_bundle_name].app file in Derived Data.
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. You can also upload this ipa to a device manually in Xcode via the following process (bonus info, yay!)
Credit where it is due: https://medium.com/ios-os-x-development/how-to-run-your-iphone-test-on-aws-device-farm-98f18086811e
Upvotes: 0