Reputation: 189
I have a complex enough application with some tests which as far as I remember used to run and give output whether they were successful or not.
I did not run the tests every time I changed the code (not very proud of it) but now after some months after the last test run, I cannot seem to run the tests on device. Xcode has been updated at least 2 times since then.
Before giving you the 3 different errors I get each time I run the tests (yes, it is that bad), I have to mention that I get nearly the same behavior with a fresh, minimal test app I created to see what is going on. The tests I run in that case are also minimal, like:
assetEqualsObjects(@"a", @"b").
Every time I run the test, I get no output apart from the "success" or "failed" icon, which is not consistent at all, as it passes or fail the same test depending on its whims.
"sometimes" i get this popup error:
The run destination .... is not valid for Testing the scheme 'TestApplication'.
"some other times" i get the following popup:
process launch failed: timed out trying to launch app
and finally, sometimes I get an error in the main loop in this line:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
I would go deeper to my app and see what I m doing wrong, but I luckily created a minimal app and i get the same behavior.
i would like that someone if not give a solution, at least try to help to isolate the error...
UPDATE: my primary development device is an iPhone 6s, but I tried to reproduce the problem on an iPhone 6 and and could not, everything works as it should. So the problem may be at the phone...
Upvotes: 1
Views: 185
Reputation: 189
So, the problem appears to be solved after rebooting the device. When the problem first arose, I rebooted the Mac and Xcode but this did not help, so my guess was that it was not deterministic. I was proved wrong...
Upvotes: 2