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 UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
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)