Can I execute UI Tests on a physical device? I have tried a few approaches/combinations with target/scheme but I am not able to run it on a device and I am getting no errors either.
run UI Tests xcode 7 on a device
Asked Answered
You have to enable Enable UI Automation
at Settings / Developer
(maybe a restart is needed, as usual) :-)
Thanks @Flori. It is now working. Might have been the new xcode version –
Mithraism
Yes you can. What is the real issue and what have you tried so far?
You should be able to run the test simply by selecting your device from the device menu
then running your test by clicking the arrow by your test
Also, make sure your UI Target is pointing to your app:
This is what I have done so far: 1) My UI Test target is: MyUITests <br/> 2) Created a new scheme and linked to my UI Test Target (MyUITests)<br/> 3) When I select that scheme using the Run button nothing really runs on my device and I just get a "Build Succeded" (device is selected)<br/> 4) When I select that scheme using the Test button nothing really runs on my device and I just get a "Test Succeded" (device is selected)<br/> <br/> Not really sure what step I might be missing –
Mithraism
@jonnycage what device are you using with what iOS, and what version is your xcode? And does your test run fine on a simulator? –
Guayule
I am using an iPhone 6 running iOS 9.2 and the latest xCode. Yes the tests run perfect on the simulator –
Mithraism
@jonnycage You don't need to create a new scheme. Select your Debug scheme or your regular one then make sure your MyUITests target is pointing to that target as Application Target. –
Guayule
I'm seeing this issue as well. I believe it may be a bug with 7.2. –
Pga
@ApopheniaOverload I did have this same problem before as well when I installed 7.2 beta. This problem went away for me when I updated my device to 9.2: #34184765 –
Guayule
Thanks @JamesGoe. I got it running on the device. Restarted my phone and my mac and all worked. Although none of them pass (they all pass using the simulator). On the device I am getting "UI Testing Failure - App accessibility isn't loaded". Any ideas? –
Mithraism
© 2022 - 2024 — McMap. All rights reserved.