Testing with Cucumber
There are already many books that get you started with Cucumber, but most of them only teach you the basics or focus on one technology. Cucumber has evolved to a powerful tool though, and today there’s almost no kind of software application that Cucumber can’t test.
The book Cucumber Recipes by Ian Dees, Matt Wynne and Aslak Hellesøy unveils what’s possible with Cucumber today. The 240 pages contain 43 recipes covering several aspects of software development like Testing, Documentation and Continuous Integration. If you are interested in Continuous Integration and Cucumber, there is – of course – a Testing Tuesday episode for that. You can find it here: How to set up Continuous Integration and Deployment with Cucumber on the Codeship.
How Cucumber Recipes helped me
The book contains a lot of techniques that helped me improve our Cucumber features at the Codeship: For instance, how to match data tables from the Cucumber scenario to the HTML page efficiently.
After reading I also cleaned up our Cucumber step definitions by using helper modules and methods instead of writing long step definitions. These greatly improved reusability among single steps and our step definition files became more readable.
Over time Cucumber suites tend to become large – and slow. Fortunately there are also several recipes about accelerating your feature execution and Cucumber workflow.
Not everything that shines is Ruby
Although Cucumber is developed in Ruby and was originally developed for Ruby, it supports numerous other technologies now. Cucumber Recipes greatly accommodates this by dedicating special sections to Java (and other JVM languages like Grails, Scala and Clojure) as well as .Net.
There are also single recipes about tools that let you use Cucumber with
- Mac apps
- and even Flash!
But the recipe that surprised me most was about testing software on embedded devices like an Arduino controller.
The book baffled me in two ways: It showed me how many things I still don’t know about testing web applications with Cucumber. It is a toolbox for Cucumber professionals that fills your blind spot.
But it also surprised me to find out that there’s almost no kind of software today that you can’t test with Cucumber. Browsing these “foreign language” recipes whetted my appetite for giving other languages a try again.
If you want to become a Cucumber pro or you want to explore where your Cucumber skills will help you, I encourage you to read Cucumber Recipes. It is probably the most advanced and comprehensive book about Cucumber out there.