# Support test retries in the Xcode Test Step

**URL:** https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134
**Category:** Released
**Tags:** feature-request, released
**Created:** [June 8, 2021, 2:12pm UTC](https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134 "2021-06-08T14:12:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![laszlo.pusok](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@laszlo.pusok](https://discuss.bitrise.io/u/laszlo.pusok)
#### Post date: [June 8, 2021, 2:12pm UTC](https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134/1 "2021-06-08T14:12:13Z")

</div>

## Description of the feature request

Would like to request an option to retry failed tests in the Xcode Test Step if the test is flaky or the Simulator crashes. This allows for more reliable test runs and avoids having to re-run PR builds, allowing for quicker turnaround.

## Use case / for what or how I would use it

We could minimize the number of failed builds caused by testing related failures. This would prevent having to manually rebuild those failed builds. If there are flaky tests in the project, they could be automatically identified without contacting a developer or Bitrise Support.

Also if the Xcode Simulator crashes during the Xcode Test Step, only the whole test suite can be rerun. Ideally, you could rerun only the failed tests or the ones that have not been run yet. Rerunning test that has not been run yet would reduce build time.

## Related info - WWDC reference

[https://developer.apple.com/videos/play/wwdc2021/10296/](https://developer.apple.com/videos/play/wwdc2021/10296/)

## Affected components

- [Xcode 13 test repetition support · Issue #167 · bitrise-steplib/steps-xcode-test · GitHub](https://github.com/bitrise-steplib/steps-xcode-test/issues/167)

---

<div class="post-metadata">

### Author: ![cmonteirodialpad](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/cmonteirodialpad/32/2906_2.png) [@cmonteirodialpad](https://discuss.bitrise.io/u/cmonteirodialpad)
#### Post date: [June 14, 2021, 6:03pm UTC](https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134/2 "2021-06-14T18:03:55Z")

</div>

+1 on this

---

<div class="post-metadata">

### Author: ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)
#### Post date: [June 16, 2021, 1:43pm UTC](https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134/3 "2021-06-16T13:43:23Z")

</div>

Hi there, thanks for your feature request! 🙂

---

<div class="post-metadata">

### Author: ![godreikrisztian](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/godreikrisztian/32/22_2.png) [@godreikrisztian](https://discuss.bitrise.io/u/godreikrisztian)
#### Post date: [July 7, 2021, 10:42am UTC](https://discuss.bitrise.io/t/support-test-retries-in-the-xcode-test-step/17134/4 "2021-07-07T10:42:13Z")

</div>

`should_retry_test_on_fail` utilizes the new test repetition if Xcode version \>= 13 and Test Plan support introduced via the new `test_plan` Step Input. The changes are available in [version 2.7.0](https://github.com/bitrise-steplib/steps-xcode-test/releases/tag/2.7.0).
