unboxed / icuke

Integration testing for iPhone applications with Cucumber
MIT License
192 stars 26 forks source link

UIDatePicker hangs executable #8

Open brow opened 14 years ago

brow commented 14 years ago

I've noticed that the presence of a UIDatePicker anywhere in the view hierarchy seems to cause my application to hang during Cucumber tests.

You can reproduce the issue in Universal.app by adding the following line to the end of -[TestViewController_Shared viewDidLoad]:

[self.view addSubview:[[[UIDatePicker alloc] init] autorelease]];

Then recompile and run cucumber in the project root. The app will hang in Simulator, and the test suite will fail with a trace showing a timeout exception.

ahinz commented 13 years ago

For other iCuke users out there who ran into this issues: This happens because the apple date picker has an absurd number of rows. If you extend your timeout it will eventually return. Our test took about 10 minutes and returned over 100MB of xml. You can fix this by inject a dylib that overrides the XML generation for the date picker