Xcode 7.3 SDK iOS 9.3, tests per unit of XCTest interface do not work

In my application, I used unit t20> UI tags, it worked fine with Xcode 7.2. with the iOS 9.2 base SDK, but as soon as I tried to run them with Xcode 7.3, with the iOS 9.3 base SDK, they all do not work.

After viewing this problem, it seems that after the application starts, it tries to click the buttons too quickly, note that at this stage I can say that the button is simple NSPredicateand it really exists, the engine finds it, but when it tries to click, despite what doesn’t work in the logs, the method for is IBActionNOT called.

I developed a completely new project to test this problem. At first I just created one application for viewing, no navigation controller, with one UIButtonand connected IBAction to the view controller, and then just added this unit test interface:

    func testExample()
{
    XCUIApplication().buttons["Button"].tap()
}

And set a breakpoint in the method IBActionon my view controller, it is called. Then I decided to do mine UIViewControllerusing the root view controller button UINavigationController, I passed the same test, and now the crane does not work !. If I add a simple delay, for example:

    func testExample()
{
    sleep(1)
    XCUIApplication().buttons["Button"].tap()
}

, IBAction. Xcode 7.2. . , Xcode 7.3 , , IOS Base SDK 9.3, UI XCTest, , sleep setUp , , , , - , - ?

, , 0,3 ,

NSThread.sleepForTimeInterval(0.4) // works
NSThread.sleepForTimeInterval(0.3) // Does not work

, 0,35 , , , , , .

+4

All Articles