Saturday, March 13, 2010

PeepCode screencast: Use the Cucumber

I've been interested in acceptance testing tools recently and Cucumber has been at the top of my list. PeepCode recently released a screencast on Cucumber. I've viewing it right now; the screencast is excellent and a nice introduction to Cucumber. I'm thinking of using it on a Grails web app. The screencast is based on a Rails 2 web application, which Cucumber seems to integration seamlessly with. Supposedly Cucumber is technology agnostic and works against any sort of web application.

5 comments:

  1. I haven't tried it, but you might want to check out cuke4duke. It's a cucumber clone for the various languages on the java platform. I've run across it a couple of times recently.

    ReplyDelete
  2. @Ted: Thanks for the link. After watching the screencast, it seems like a lot of what Cucumber is doing is regexes of plain English statements tied to executable code (steps in Cucumber speak). Very simple approach, and I'm glossing over a lot here, but its an approach that seems to work. I wonder if you couldn't build some similar using Groovy. In the end, Cucumber is interesting as it abstracts away all the technical details of interacting with an interface and allows you and perhaps your customer and testers to build executable acceptance tests in plain English. That's pretty cool.

    ReplyDelete
  3. Chris, Cucumber is pretty slick. You might want to check out the RSpec book from the PragProgs (its about to be published, but in beta right now). It says its RSpec, but it has a lot of Cucumber in it. One of the things I liked about it was it showed the process of writing acceptance tests in Cucumber, then writing more fine-grained tests with RSpec. I really like that approach for TDD. Of course its all Ruby code so don't get freaked out by the lack of curly braces, its still good stuff... ;-)

    ReplyDelete
  4. @John: I have the eBook version of the PragProgs RSpec book. Taking Ted's advice, I went out and starting messing around with cuke4duke. After a short bit of time configuring my Maven POM, I was able to get the bits downloaded and was able to get a feature to run against Google using WebDriver. Feature and steps are written in Groovy. Looking to add cuke4duke to the workshop Joe Muraski and I will be doing for GR8 in the US. I really dig Cucumber.

    ReplyDelete