How to rerun the failed scenarios using Cucumber?

Run Cucumber with rerun formatter:

cucumber -f rerun --out rerun.txt

It will output locations of all failed scenarios to this file.

Then you can rerun them by using

cucumber @rerun.txt

Leave a Comment