kif-framework / KIF

Keep It Functional - An iOS Functional Testing Framework
Other
6.21k stars 912 forks source link

Doesn't work in bots on XCode Continuous Integration #485

Closed Koshub closed 6 years ago

Koshub commented 9 years ago

Example report:

Bot Issue: testFailure. Uncategorized. Issue: The step timed out after 10.00 seconds: Keyboard is not visible. File: ManagingServerSettingTestCase.m. Test Case: -[ManagingServerSettingTestCase testCancelSaveNewServer]. Integration Number: 1. Integration URL: https://magmacmini.local/xcode/bots/9637A7B/integrations Description: The step timed out after 10.00 seconds: Keyboard is not visible.

But the test succeeded when i launch it directly from XCode with the same scheme.

bnickel commented 9 years ago

Have you gone into the simulator on the server and enabled the software keyboard? CommandShiftK

There was a behavior change in the iOS8 simulator that hasn't been resolved.

Koshub commented 9 years ago

Simulators are running with bots, so I can't do anything with simulator while bot is running it. When I run test on server from XCode - they work normal.

phatmann commented 9 years ago

If you open the simulator manually and enable the software keyboard, the Bot should honor that setting.

Koshub commented 9 years ago

@phatmann, I have tried but nothing changed. Have you tried this?

alexasfb commented 9 years ago

Hey, this is also failing for me on iOS 7.1 simulator. Did you guys figured a solution?

bnickel commented 9 years ago

@Koshub @alexasfb Can you try out the fix-tests or keyboard-rework branches? They have a different mechanism for dealing with Xcode 6's hardware keyboard configuration.

bnickel commented 9 years ago

master has been updated and this issue should be resolved. Please reopen if you're still running into it.

Koshub commented 9 years ago

Got pod 'KIF', :git => 'https://github.com/kif-framework/KIF.git', :branch => 'master'. Now tests fail because clearTextFromViewWithAccessibilityLabel doesn't call (BOOL)textField:(UITextField )textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString )string. So it is not compatible to previous behavior, and I think it is wrong behavior.

bnickel commented 9 years ago

That's exceptionally weird. I see the behavior you're describing but it's not a deficiency in the keyboard code, it's a deficiency in the the "Cut" menu item:

Manual:

2014-11-07 10:02:28.314 Test Host[15811:2088473] range: {0, 5}, replacementString:
2014-11-07 10:02:36.717 Test Host[15811:2088473] range: {0, 0}, replacementString:t
2014-11-07 10:02:37.364 Test Host[15811:2088473] range: {1, 0}, replacementString:e
2014-11-07 10:02:38.125 Test Host[15811:2088473] range: {2, 0}, replacementString:s
2014-11-07 10:02:38.920 Test Host[15811:2088473] range: {3, 0}, replacementString:t

KIF

Test Case '-[TypingTests testClearingALongTextField]' started.
2014-11-07 10:07:42.467 Test Host[15869:2111923] range: {0, 0}, replacementString:t
2014-11-07 10:07:42.506 Test Host[15869:2111923] range: {1, 0}, replacementString:e
2014-11-07 10:07:42.540 Test Host[15869:2111923] range: {2, 0}, replacementString:s
2014-11-07 10:07:42.574 Test Host[15869:2111923] range: {3, 0}, replacementString:t
Test Case '-[TypingTests testClearingALongTextField]' passed (7.377 seconds).

I'll investigate why that event isn't hitting the delegate.

bnickel commented 9 years ago

My bad. Thought I was using "Cut" to delete everything. Turns out -[UIKeyboardImpl deleteBackwards] doesn't call the delegate method but -[UIKeyboardImpl deleteFromInput] does. Go ahead and try again with 389b338ebf2b93308db0d53e83b540d5c0c0900f.

Koshub commented 9 years ago

Got pod 'KIF', :git => 'https://github.com/kif-framework/KIF.git', :commit => '389b338ebf2b93308db0d53e83b540d5c0c0900f' Works locally, but still doesn't work in CI Server. Can anyone else try to test? I don't think but may be only my project have this issue...

SerenadeX commented 8 years ago

Still seeing this problem. Any progress on this? I would love to get our tests setup with Xcode Server, but they lock up on our KIF tests