{"id":14285,"date":"2016-04-28T15:06:14","date_gmt":"2016-04-28T19:06:14","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=14285"},"modified":"2016-04-28T15:06:14","modified_gmt":"2016-04-28T19:06:14","slug":"running-ui-tests-on-ios-with-ludicrous-speed","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/04\/28\/running-ui-tests-on-ios-with-ludicrous-speed\/","title":{"rendered":"Running UI Tests on iOS With Ludicrous Speed"},"content":{"rendered":"<p><a href=\"https:\/\/pspdfkit.com\/blog\/2016\/running-ui-tests-with-ludicrous-speed\/\">Peter Steinberger<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pspdfkit.com\/blog\/2016\/running-ui-tests-with-ludicrous-speed\/\">\n<p>We rely on busy waiting via creating a custom runloop - the condition is checked every x milliseconds and only once it returns <code>true<\/code>, the control flow continues. This might seem crude, but it&rsquo;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&rsquo;s somewhat similar to <code>XCTestCase<\/code>&rsquo;s asynchronous testing extension <code>waitForExpectationsWithTimeout:handler:<\/code>, just faster and more flexible.<\/p>\n<p>Now, the final puzzle is to simply increase the speed of Core Animation itself. And the best part: This is not even private API!<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>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&rsquo;s a much, much better solution than adding random timeouts and allows us to run tests at an insane speed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[689,31,1137,71,268],"class_list":["post-14285","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-core-animation","tag-ios","tag-ios-9","tag-programming","tag-testing"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=14285"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14285\/revisions"}],"predecessor-version":[{"id":14286,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14285\/revisions\/14286"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=14285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=14285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=14285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}