Somehow the ruby guys get sexy things done and I often think: why
can't I have that? They also have a knack for naming things in a fun,
but good way. Enter Cucumber.

Cucumber is a Behavior Driven Development tool, and brings human
readable, testable specifications to programming. You can find more
about Cucumber on their website [1], and I urge you to take a look at
the Railscasts [2,3,4] to see it in action. I found it really
enlightening to see this in action and wanted it for myself.

If you're too lazy: this is how a testable, human readable Cucumber
specification looks like:

Feature: Helloworld
    In order to greet the world
    As a user
    I want to see the text Hello World in a browser window.

    Scenario: Hello World
    Given I am viewing the home page
    Then I should see "Hello World"

Running this using maven results in:

[INFO] Feature: Helloworld
[INFO]   In order to greet the world
[INFO]   As a user
[INFO]   I want to see the text Hello World in a browser window.
[INFO]
[INFO]   Scenario: Hello World              # features/helloworld.feature:7
[INFO]     Given I am viewing the home page # WicketSteps.iAmViewing(String)
[INFO]     Then I should see "Hello World"  # WicketSteps.iShouldSee(String)


Fortunately for us Java weenies, Aslak Hellesøy has created a Java
implementation of Cucumber, and even enabled it for use within Maven:
cuke4duke.

Over new years I've been trying to see if I could get it to work with
Wicket, and those efforts are now available for anyone to take a look
at:

    http://github.com/dashorst/cucumber-wicket

There's not much to see (yet), and I'm hoping for some feedback as to
how you would write your own specifications. Is this something you get
excited about?

Martijn

[1] http://cukes.info
[2] http://railscasts.com/episodes/155-beginning-with-cucumber
[3] http://railscasts.com/episodes/159-more-on-cucumber
[4] http://railscasts.com/episodes/186-pickle-with-cucumber

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

Reply via email to