Artem Stepanenko Artem Stepanenko - 2 years ago 370
Objective-C Question

How to speed up UI test cases in Xcode?

Since Xcode 7 we have a nice API for UI testing.
Mostly I'm satisfied with it. The only concern is related to the speed.

In the beginning an ordinary UI test case (about 15 actions) ran approximately 25 seconds. Then I mocked networking completely. Now it takes 20 seconds. Considering the fact that the time is taken only by animations and a launch time (1 second or even less), I assume, there must be a way to speed it up.

Answer Source

Try setting this property when your UI tests run:

UIApplication.sharedApplication().keyWindow?.layer.speed = 100

There's a few more handy tips in this blog post.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download