{"id":3209,"date":"2023-06-08T21:15:41","date_gmt":"2023-06-09T01:15:41","guid":{"rendered":"https:\/\/michaelrowe01.com\/?p=3209"},"modified":"2023-06-08T21:15:42","modified_gmt":"2023-06-09T01:15:42","slug":"fix-failures-faster-with-xcode-test-reports","status":"publish","type":"post","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/fix-failures-faster-with-xcode-test-reports\/","title":{"rendered":"Fix failures faster with Xcode test reports"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"371\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?resize=660%2C371&#038;ssl=1\" alt=\"\" class=\"wp-image-3213\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-25.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<p>A tour of test reports in Xcode<\/p>\n\n\n\n<p>Structuring tests<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Test methods are individual tests<\/li>\n\n\n\n<li>Test classes &#8211; are groups of test methods<\/li>\n\n\n\n<li>Test Bundles &#8211; one or more test class<\/li>\n\n\n\n<li>Unit vs. UI tests\n<ul class=\"wp-block-list\">\n<li>Unit Test &#8211; Source doe<\/li>\n\n\n\n<li>UI &#8211; User actions<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Test Plan &#8211; runs over the app and has both unit and UI<\/li>\n\n\n\n<li>Configurations &#8211; say how to setup the environment for your test\n<ul class=\"wp-block-list\">\n<li>Language and location<\/li>\n\n\n\n<li>Code coverage<\/li>\n\n\n\n<li>Test repetitions<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Run Destinations\n<ul class=\"wp-block-list\">\n<li>Devices to run on&nbsp;<\/li>\n\n\n\n<li>In the IDE you can run against 1 destination<\/li>\n\n\n\n<li>In Xcode cloud you can choose many<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Sample test plan<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"371\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?resize=660%2C371&#038;ssl=1\" alt=\"\" class=\"wp-image-3212\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.04.21-2.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One line is a single test run<\/li>\n<\/ul>\n\n\n\n<p>Explore the test report<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The report provides a high-level summary of your test run, highlighting important patterns<\/li>\n\n\n\n<li>One stop shop<\/li>\n\n\n\n<li>Richer failure information for UI testing<\/li>\n\n\n\n<li>You can run within CI and get a report<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"371\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?resize=660%2C371&#038;ssl=1\" alt=\"\" class=\"wp-image-3211\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.06.30-2.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Here\u2019s a sample run report, can see insights to see the notable issues across all configurations and runs. Further down you can get the actual test errors.<\/li>\n\n\n\n<li>In the run view you can actually find the failure message and the call stack so you can go directly to your source code.<\/li>\n\n\n\n<li>For UI tests you can actually get a video of the test at the point where it failed so you can see the failure in context.&nbsp; Of course you also have the video of the entire test so you can see the full behavior.&nbsp;<\/li>\n\n\n\n<li>Clicking on an event takes you to that point in the test run and shows the video scrubber<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"371\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?resize=660%2C371&#038;ssl=1\" alt=\"\" class=\"wp-image-3210\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/Screenshot-2023-06-08-at-21.12.20-2.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>A tour of test reports in Xcode Structuring tests Explore the test report<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_wp_convertkit_post_meta":{"form":"-1","landing_page":"0","tag":"0","restrict_content":"0"},"hide_page_title":"","footnotes":""},"categories":[2,3],"tags":[109,722,680,446],"class_list":["post-3209","post","type-post","status-publish","format-standard","hentry","category-blog","category-personal-softwareandit","tag-day-4","tag-test-reports","tag-wwdc23","tag-xcode"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/comments?post=3209"}],"version-history":[{"count":1,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3209\/revisions"}],"predecessor-version":[{"id":3214,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3209\/revisions\/3214"}],"wp:attachment":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/media?parent=3209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/categories?post=3209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/tags?post=3209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}