Cucumber and html reports


#1

Hi,

Is there anyway I can cycle through all the features in a folder and
pipe to html
through the command line?

For this:
C:\SvnProjects\my_application\features> cucumber *.feature --format html

my_application.htm

I am getting a wrong number of arguments (3 for 1).

Or how could run all features with a HTML report in a rake file?

Thanks

Aidy


#2

On Tue, Oct 7, 2008 at 11:39 AM, aidy lewis removed_email_address@domain.invalid
wrote:

Hi,

Is there anyway I can cycle through all the features in a folder and
pipe to html
through the command line?

For this:
C:\SvnProjects\my_application\features> cucumber *.feature --format html

my_application.htm

This works for me:

cucumber folder_name --format html > report.html

Cheers,
David


#3

Hi David,

cucumber folder_name --format html > report.html

Thanks for your response.

That doesn’t seem to report for me (maybe it is because one of my
tests fails - throws an exception and then writes to the console
before it outputs to the html file).

Cheers

Aidy


#4

On Tue, Oct 7, 2008 at 6:47 PM, David C. removed_email_address@domain.invalid
wrote:

This works for me:

cucumber folder_name --format html > report.html

Which should be obvious if you do cucumber --help

Usage: cucumber [options] FILES|DIRS

Aslak


#5

On Tue, Oct 7, 2008 at 6:39 PM, aidy lewis removed_email_address@domain.invalid
wrote:

I am getting a wrong number of arguments (3 for 1).

Or how could run all features with a HTML report in a rake file?

I just made that a little easier:
http://github.com/aslakhellesoy/cucumber/commit/ff6cb5143d49448a05c46c03180ed8f6ecb240af
http://github.com/aslakhellesoy/cucumber/commit/7cbbc40e99ed278f172f85178c383ba7ae733bdd

Essentially, just pass --format html --out yourfile.html to the rake
task’s cucumber_opts

Aslak


#6

On Tue, Oct 7, 2008 at 7:14 PM, aidy lewis removed_email_address@domain.invalid
wrote:

Sorry for being a balloon.

However,

  1. The report seems to only colour in firefox
  2. When an exception is thrown the rest of the report is grey.

Do I need to raise a ticket?

I just noticed that. It’s definitely a bug. The bug can be reproduced
like this:

cd examples/calculator
rake features PROFILE=html
open features.html

Please raise a ticket.

Aslak


#7

Guys.
On 07/10/2008, aidy lewis removed_email_address@domain.invalid wrote:

Thanks for your response.

That doesn’t seem to report for me (maybe it is because one of my
tests fails - throws an exception and then writes to the console
before it outputs to the html file).

Sorry for being a balloon.

However,

  1. The report seems to only colour in firefox
  2. When an exception is thrown the rest of the report is grey.

Do I need to raise a ticket?

Aidy