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 web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
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)