Thursday, April 28, 2016

Running UI Tests on iOS With Ludicrous Speed

Peter Steinberger:

We rely on busy waiting via creating a custom runloop - the condition is checked every x milliseconds and only once it returns true, the control flow continues. This might seem crude, but it’s a much, much better solution than adding random timeouts and allows us to run tests at an insane speed while also getting reliable results, even under heavy load. It’s somewhat similar to XCTestCase’s asynchronous testing extension waitForExpectationsWithTimeout:handler:, just faster and more flexible.

Now, the final puzzle is to simply increase the speed of Core Animation itself. And the best part: This is not even private API!

Comments RSS · Twitter

Leave a Comment