Forum: RSpec cucumber and html reports

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ee6788c2faaad7a5cd0bc466c9ea60d8?d=identicon&s=25 aidy lewis (Guest)
on 2008-10-07 18:44
(Received via mailing list)
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
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-10-07 18:48
(Received via mailing list)
On Tue, Oct 7, 2008 at 11:39 AM, aidy lewis <aidy.lewis@googlemail.com>
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
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 aslak hellesoy (Guest)
on 2008-10-07 19:00
(Received via mailing list)
On Tue, Oct 7, 2008 at 6:47 PM, David Chelimsky <dchelimsky@gmail.com>
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
Ee6788c2faaad7a5cd0bc466c9ea60d8?d=identicon&s=25 aidy lewis (Guest)
on 2008-10-07 19:10
(Received via mailing list)
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
Ee6788c2faaad7a5cd0bc466c9ea60d8?d=identicon&s=25 aidy lewis (Guest)
on 2008-10-07 19:15
(Received via mailing list)
Guys.
On 07/10/2008, aidy lewis <aidy.lewis@googlemail.com> 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
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 aslak hellesoy (Guest)
on 2008-10-07 19:58
(Received via mailing list)
On Tue, Oct 7, 2008 at 6:39 PM, aidy lewis <aidy.lewis@googlemail.com>
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/ff...
http://github.com/aslakhellesoy/cucumber/commit/7c...

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

Aslak
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 aslak hellesoy (Guest)
on 2008-10-07 19:58
(Received via mailing list)
On Tue, Oct 7, 2008 at 7:14 PM, aidy lewis <aidy.lewis@googlemail.com>
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
This topic is locked and can not be replied to.