Cucumber pretty html formatter for textmate

I’ve been using cucumber a lot recently along with the textmate bundle for it.
The HTML output cucumber creates is fine, but not all that pretty.

I’ve created a new formatter for cucumber to generate HTML enhanced with some javascript.
My inspiration came from the textmate bundle for rspec.

You can grap it off my github.
Here’s some screenshots:

UPDATE: I replaced the original html formatter in cucumber; as of 19th November my fork has been merged into Aslak’s cucumber/master upgrade to the cucumber 0.4.5 release.
View the commit history

6 thoughts on “Cucumber pretty html formatter for textmate

  1. Nice work Rob, you’ve definitely made an improvement there – my only suggestions for improvement would be to tone down the styles even more than you have done – take away a few of the borders and boxes and allow the user to focus on the text more.

  2. By the way, is there any way I can see any ouput writtern to standard out (using puts) for debugging purposes when I run a scenario? I can see it with the original html formatter that comes with the Cucumber bundle.

    Thanks.

  3. Did something break? I get a runtime error when I add the two files to the features/support directory. Was really psyched to use this :(

  4. hello Rob,

    I am new to maven and cucumber, I used an example created by thomas about cucumber and selenium in java, I already have a pom.xml file, my question is:to get this formatter working for me should i replace the existing POM.xml file with the one from cucumber-html. or should I import only your pom.xml file and the project will be created for me, if so how can I link my project (cucumber and selenium in java,) with your project (cucumber-html)to get the formatter working.
    please advise what to do?

    Thank you.

  5. Hey there

    When I place a debugger call (ruby-debug) within one of my Cucumber step files and run it through the console, then I can debug.

    But when I run it through the TextMate bundle (Cmd-R), it doesn’t stop at the debugger statement, but prints some strange stuff into the output HTML like:

    /Users/josh/Documents/Work/Sientia/iq/features/step_definitions/contact_steps.rb:19 @contact = Contact.first *** Unknown command: “Feature: Edit contact”. Try “help”. *** Unknown command: ” In order to change a contact’s data”. Try “help”. *** Unknown command: ” As a user”. Try “help”. *** Unknown info command want *** Unknown command: ” “. Try “help”. *** Unknown command: ” Background:”. Try “help”. *** Unknown command: ” Given I am logged in”. Try “help”. *** Unknown command: ” And the following contacts exist:”. Try “help”. *** Unknown command: ” | firstname |”. Try “help”. *** Unknown command: ” | John |”. Try “help”. *** Unknown command: ” And I am at the contacts”. Try “help”. *** Unknown command: ” And I am at the contacts”. Try “help”. *** Unknown command: ” @javascript”. Try “help”. *** Unknown command: ” Scenario: I edit a contact”. Try “help”. *** Unknown command: ” When I select a contact”. Try “help”. *** Unknown command: ” And I click edit preview”. Try “help”. *** Unknown command: ” And I click on its name”. Try “help”. *** Unknown command: ” Then I should see the “Kontakt bearbeiten” form”. Try “help”. *** Unknown command: ” When I change “Vorname” to “Jack”". Try “help”. *** Unknown command: ” And I click “Bearbeiten”". Try “help”. *** Unknown command: ” Then I should see item successfully updated message”. Try “help”. *** Unknown command: ” And I should see “Jack Doe”". Try “help”.

    Is there a way to stop TextMate and open a console with the debugger?

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>