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
cucumber re-run failed scenarios automatically with a tag?
I've been considering writing something like what you're describing, but I found this:
http://web.archive.org/web/20160713013212/http://blog.crowdint.com/2011/08/22/auto-retry-failed-cucumber-tests.html
In a nutshell: he makes a new rake task called cucumber:rerun that uses rerun.txt to retry failed tests. It should be pretty easy to add some looping in there to retry at most 3x (for example).If you're tired of having to re-kick builds in your CI server because of non deterministic failures, this post is for you.
Rerun Failed test Cases in Cucumber Automatically using Maven Command
maven-surefire-plugin
has built-in option to rerun failed tests.
Simply add <rerunFailingTestsCount>1</rerunFailingTestsCount>
in <configuration>
of surefire plugin
Related Topics
Private Messages with Faye and Rails
Pod Install in Xcode Bots Trigger
How to Deploy a Test App on Dreamhost Rails 3.0.4
Server Sent Events and Rails Streaming
Rails Validating Search Params
How to Render Blob Images in a Prawn Document
Foreign Key (Class_Id) Not Populating in Belongs_To Association
Importing CSV Data into a Ruby Array/Variable
Good Forms Helpers for Sinatra
I Need to Go from HTML to Markdown, Any Suggestion
Dynamic Role Attributes in Chef
Including Methods to a Controller from a Plugin
How to Remove Header and Footer from Some of The Pages in Ruby on Rails
Can't Install Debugger Gem - Rails - MAC Osx Mavericks
Capistrano, Firewalls and Tunnel
Typeerror: Can't Convert Net::Httpok into String
Can You Specify The Http Method to Use with Sinatra's Redirect
How to Find Word with The Greatest Number of Repeated Letters