As Ebay engineer Evan Pierce explains, re-running all failing tests has a number of disadvantages, including the possibility of missing on intermittent bugs, the need for some specific tool to automate this step, slowness, and more. Instead of running whole tests, Targeted Auto Retry focuses on those steps that are more likely to fail, such as app launch.

In practice, with Targeted Auto Retry, you focus on some step of your setUp/tearDown unit test and, if that step fails, you run it again until either it passes or a maximum retry limit is reached. It is important to notice that Targeted Auto Retry is not applied to all of your unit tests by some tool able to instrument your test code. Rather, it is your choice to add it for a specific step of a test you suspect could be flaky. In this way, it provides a convenient way to further investigate a failing step.

#testing #open-sources #swift #xcode

Ebay Open-Sources Package to Reduce Test Flakiness Using Swift and Xcode
1.10 GEEK