Read more

Geordi: How to rerun failed features

Emanuel
August 20, 2018Software engineer at makandra GmbH

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

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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
Posted by Emanuel to makandra dev (2018-08-20 08:56)