[Cucumber] pretty html output?


#1

Cucumberists (and RSpec Classic users ;):

How can we convert a Cucumber feature file into HTML with syntax
highlighting?

Not the test-runner output; that’s preprocessed so it does not match the
input
file…

Tx!


Phlip


#2

Phlip wrote:

Cucumberists (and RSpec Classic users ;):

How can we convert a Cucumber feature file into HTML with syntax
highlighting?

Not the test-runner output; that’s preprocessed so it does not match
the input file…

Tx!

Using this:

http://github.com/bmabey/cucumber-pygments-lexer/tree/master

You can get something like:

http://www.benmabey.com/cucumber_on_github.html

Let me know if you have questions.

-Ben


#3

Ben M. wrote:

http://github.com/bmabey/cucumber-pygments-lexer/tree/master

You can get something like:

http://www.benmabey.com/cucumber_on_github.html

Nice! Will use!

And could we make it … cucumber colored? like cucumber.css probably
does? (-:


#4

Ben M. wrote:

And could we make it … cucumber colored? like cucumber.css probably
does? (-:

cucumber.css? Is that what cucumber uses for it’s HTML formatter? I’m
sure you could. I would recommend starting with the github css I have
in the project and use Firebug/Webdeveloper to change the styles inline
until it looks good to you. If you change them with Webdeveloper (the
Firefox plugin) you can save the new CSS to a different file. If you
end up creating new CSS please fork the project and send me a pull
request for it. :slight_smile: Thanks.

Uh, I had just figured (only going for the leafy green cucumber-plant
colors and
the standard Helvetica font) to reach out to the user’s cucumber.css in
its
distro and borrow it. Or borrow it myself and check in a copy, but
either way I
did figure on editing it!

I will add your suggestions to the potential do-list…

BTW you can just copy styles out of Firebug, too, at least one block at
a time!


Phlip


#5

Hi Philip,
I use the vim (with the tpope
http://github.com/tpope/vim-cucumber/tree/master)
and the command Syntax -> Convert to HTML

Giovanni


#6

Phlip wrote:

And could we make it … cucumber colored? like cucumber.css probably
does? (-:

cucumber.css? Is that what cucumber uses for it’s HTML formatter? I’m
sure you could. I would recommend starting with the github css I have
in the project and use Firebug/Webdeveloper to change the styles inline
until it looks good to you. If you change them with Webdeveloper (the
Firefox plugin) you can save the new CSS to a different file. If you
end up creating new CSS please fork the project and send me a pull
request for it. :slight_smile: Thanks.

-Ben