Reputation: 635
I currently learning XCTest for the purpose of unit testing. I was able to run the default template XCtest on the simulator without any problem. I could all the green ticks in the test navigation view. However, when I ran them on the device with my app as host application, nothing happens. My app was launched on the device and the XCTest did not seem to run. I even put a break point in the test and it did not break. Also, in the simulator, the app automatically stops when tests finish, however, when running on device, my app was just kept running and never put to a stop. Am I doing something incorrect?
Upvotes: 4
Views: 6153
Reputation: 521
There's a library called GHUnit we can run unit tests on iphone device. Internally it uses xctest. Here is how you setup GHUnit.
I was able to follow the instructions and setup unit tests using xcode 5. should be okay with Xcode 6?
Upvotes: 3
Reputation: 2044
xCode should show this message when running XCTest on a physical device.
Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.
Upvotes: 4