Geordi: How to rerun failed features

Posted Over 5 years ago. Visible to the public. Repeats.

Geordi's cucumber command has a --rerun option that reruns failing tests the given number of times. Usage:

geordi cucumber path/to/features --rerun=2
geordi cucumber path/to/features -r2

Background and how to rerun manually

Cucumber will save a file tmp/parallel_cucumber_failures.log containing the filenames and line number of the failed scenarios after a full test run. Normally you can say cucumber -p rerun (rerun is a profile defined by default in config/cucumber.yml) to rerun all failed scenarios.

Here are a few alternative ways, should you need them:

With geordi

geordi cucumber @tmp/parallel_cucumber_failures.log

or

# Use the failing features as argument for `geordi cucumber`
cat tmp/parallel_cucucmber_failures.log | xargs geordi cucumber

or

# Use the failing features as argument for `geordi cucumber`
geordi cucumber `cat tmp/parallel_cucumber_failures.log`

Without geordi

bundle exec cucumber @tmp/parallel_cucumber_failures.log

or

# Run the `cucumber profile` command
bundle exec cucumber -p rerun
Last edit
7 months ago
Dennis
License
Source code in this card is licensed under the MIT License.
Posted by Emanuel to makandra dev (2018-08-20 06:56)