The idea of "" An option to re-run tests automatically when they fail & Report a failure only if it fails 3 times in a row. "" Is;
Sometimes the failure reason could be an environment issues which is not a repeated reason.
In such cases ,
- if we execute the test in only one time, we get the test cases as fail, and flaky test analyzing team will have to put an effort to find the reason.
- But as I saw in a google article, instead they execute 3 times and report a bug if it fails 3 times only. This is a time saving method for flaky test analyzing team.
(Because google might have Automation suits with millions of scripts)
You'll be able to get more idea by reading below;
https://testing.googleblog.com/2016/05/flaky-tests-at-google-and-how-we.html