Matt Wynne is writing functional tests in natural language using a Ruby project called Cucumber. Hey, that’s what Antony Marcano was talking about when he visited yesterday! Our Selenium RC tests are getting a whole lot better but definitely not this readable yet.
Cucumber claims you can use it for Java projects if you run JRuby. Might have to try that out.
That’s the general idea… Cucumber is a re-implementation of RSpec however…
You can have the same features natively in Java by using JBehave.
http://jbehave.org/documentation/two-minute-tutorial/
One of the things the team is enjoying is having the tests written in code rather than plain text… Cucumber, RSpec and JBehave would encourage you to write the tests in plain text… that has advantages and disadvantages.
Hopefully, by the time I see you next I’ll have some examples of doing it in code… so you can have the best of both-worlds.
🙂
Following up on my last comment… there are now examples on http://JNarrate.org