0

I know how to output the entire cucumber output using cucumber --out #file_name but I just want to output the failed scenarios to a file and not output the passed scenarios. How can I achieve this?

Thanks!

Manmeet
  • 271
  • 3
  • 9
  • Check out this SO answer:http://stackoverflow.com/questions/11719898/how-to-rerun-the-failed-scenarios-using-cucumber – orde Aug 28 '14 at 20:02
  • It prints out just the line numbers of the failed scenarios but I want to be able to print the error messages too @orde – Manmeet Aug 28 '14 at 20:11

1 Answers1

0

I made formatter for this (ruby only!): https://gist.github.com/foton/d317e1b3371021fee964 . Just put this file to features/support and run cucumber with -f option. There are 4 different formatters. Difference is how the stacktrace and message is ordered/formatted.

cucumber -f Cucumber::Formatter::Failures features/some.feature 
cucumber -f Cucumber::Formatter::Failures::OneLine features/some.feature 
cucumber -f Cucumber::Formatter::Failures::TwoLines features/some.feature 
cucumber -f Cucumber::Formatter::Failures::StacktraceFirst features/some.feature 
Foton
  • 1,197
  • 13
  • 24