Revisions
-
joelbyler revised this gist
Dec 6, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ task :regression_with_retry do rerun_successful = run_rake_task("rerun") end unless first_successful || rerun_successful raise 'Cucumber tests failed' end end -
joelbyler revised this gist
Dec 6, 2012 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ STDERR.puts ENV['PROFILE'] desc 'Run regression' Cucumber::Rake::Task.new :regression do |t| t.cucumber_opts = ["-p #{ENV['PROFILE']}", "--format rerun --out #{ENV['PROFILE']}_rerun.txt"] end @@ -34,5 +34,4 @@ task :regression_with_retry do end end #jruby -S rake regression_with_retry PROFILE=regression_a -
joelbyler created this gist
Dec 6, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ require 'cucumber/rake/task' def run_rake_task(name) begin Rake::Task[name].invoke rescue Exception => e return false end true end STDERR.puts ENV['PROFILE'] desc 'Run regression' Cucumber::Rake::Task.new :regression do |t| t.cucumber_opts = ["-p #{ENV['PROFILE']}", "--format rerun --out #{ENV['PROFILE']}_rerun.txt"] end desc 'Rerun failed tests' Cucumber::Rake::Task.new :rerun do |t| t.cucumber_opts = ["-p #{ENV['PROFILE']}", "@#{ENV['PROFILE']}_rerun.txt"] end desc 'Run regression and rerun failed tests' task :regression_with_retry do first_successful = run_rake_task("regression") rerun_successful = true unless first_successful rerun_successful = run_rake_task("rerun") end unless first_successful || rerun_successful raise CucumberFailure.new 'Cucumber tests failed' end end #jruby -S rake regression_with_retry PROFILE=regression_a ----------------------------------------- Disclaimer: This message (and any attachments) is confidential and is intended only for the addressee(s). This message may contain information that is protected by one or more legally recognized privileges. If the reader of this message is not the intended recipient, I did not intend to waive, and I do not waive, any legal privilege or the confidentiality of the message. If you receive this message in error, please notify me immediately by return e-mail and delete this message from your computer and network without saving it in any manner. The unauthorized use, dissemination, distribution, or reproduction of this message, including attachments, is prohibited and may be unlawful.