Unit Tests fail to run in XCode/Xctool

250 Views Asked by At

When I run my tests using Xcodebuild or Xctool, I see that the tool builds and installs the app into the simulator but fails to run the test. It is stuck forever in either Touching <app-name>.xctest when I use xcodebuild or Launching and Running tests when using xctool. I can see that the simulator is launched with its default homescreen but does not progress after that. This happens as part of a continuous integration environment I am trying to setup.

I do a clean test when using either tool. I also run xcrun simctl shutdown "iPhone 6" || true and killall "Simulator" || true before running the xcode commands to ensure the simulator is turned off. I also tried pre-launching the simulator and waiting before initiating the test command since I read somewhere that it could help. Please note that this issue does not happen always. It happens like around 3 out of 10 times but at times, it gets even more frequent. There is no logs/trails that I could work on to debug this issue. Any help/leads would be great!

Xcode Version: 7.0.1
Xctool Version: 0.2.7
Simulator: IPhone 6
OS: Yosemite (10.10.5)

Thanks

0

There are 0 best solutions below