How to automatically execute cucumber rerun.txt?
cucumber already has a built-in retry method “cucumber -q –retry 2”. 2 is the number of retries it will run a test spec after the first failure. Of course if it passes the second time, it won’t run the additional time. You can change 2 to 3 if you want.
However if your test is flaky, you’d want to fix that.