Saturday, November 12, 2011

Cucumber for Android!

My team and I have been looking for a good way to test drive our Android development with Cucumber. Until now, we haven't found any straightforward options. The folk's at Google have done a great job of keeping testing in mind, but the tools available seem more geared towards unit & integration level testing and less towards acceptance testing.

Not long ago, cucumber-jvm popped out on github as a successor to Cuke4Duke. I was pretty excited to hear about this as it opened up a whole slew of opportunities for Cucumber in the JVM space (and possibly the Android space as well).

Another tool that's recently popped on our radar (thanks to one of our fellow LeanDogs) seemed like a good ingredient in the Cucumber + Android recipe - nativedriver .  From a (very) high level, the architecture is similar to iCuke and Frank (some cucumber for iOS tools we've been enjoying) but unlike iCuke / Frank, native driver is sans Cucumber.

After a quick spike (and from a very quick first glance), it looks like cucumber-jvm + nativedriver might be one of the more straightforward approaches to Cucumber test driving Android development!

The team and I still have quite a bit of testing and tinkering, but this combo looks promising.
I've gone ahead and popped a quick proof of concept out on Github ( here ) that still needs some cleaning up. If you happen to check it out and have any questions, let me know (@daveshah )

As I'd mentioned, there's still much to learn and much to explore, but I'm pretty pumped about having just driven Android with Cucumber and had to post :)

Happy testing!

1 comment:

  1. This is cool. Thanks for posting.

    So if you create a new feature in resources. do you have to build the step definition by hand?

    ReplyDelete