on March 15, 2012
After some experience in software testing I decided to try Cucumber. With no prior Cucumber or Ruby experience I bought this book and read it (and completed most of the examples) on a rainy weekend. Not only did this book teach me cucumber but it also gave me some cool Behavior Driven Development (BDD) ideas and concepts and even gave some ideas on how to program with Ruby. At my current place of employment, my colleague also bought the book and after reading it we confidently implemented a solid BDD test framework using Cucumber in a couple of days. I highly recommend this book for anyone who wants to learn Cucumber and also for anyone who wants to understand how BDD frameworks (like Cucumber) can be valuable on a software project.
on February 29, 2012
One of the cool things about Pragmatic Publishing is the fact that they make it possible to get your hands on Beta books, meaning you get the chance to see a book as its actively being developed. The Cucumber Book was one of those books, and as such, I've had the benefit of looking at and reviewing this book for the past several months, and have watched it grow into the book that is today (and now available in print form).
Most people who have a passing understanding of Test Driven Development or Behavior Driven Development have likely heard of Cucumber. It's a language that allows anyone who wants to define tests and requirements for applications the ability to do so in plain English (or fill in the blank language if supported). In truth, Cucumber isn't really a programming language at all, but a symbolic phrase library that matches to various underlying commands and blocks of code (represented in Ruby in this book and referencing a variety of tools including Capybara, Rspec and others).
Matt Wynne and Aslak Hellesøy have put together a very readable and focused text that help the user get familiar with the basics of the language. The book also focuses the reader on understanding the underpinnings needed to create expressions that work with their respective technologies. Granted, if you are a tester and you want to take advantage of this framework, there is plenty in here to keep you busy. The Cucumber Book starts out by explaining what Cucumber is and the niche it is meant to fill (specifications based tests and requirements). If you are a developer, there is likewise plenty in here to keep you interested, too.
The process in the Cucumber book is heavy on examples and showing how the examples work. Yes, for those who want to know how to use the syntax and language specific details of Cucumber, that stuff is covered. What is also covered, and covered well, is the Behavioral Driven Development approach needed to effectively create tests and have them work effectively. Along with creating feature files and steps for those feature files, the underlying step definitions also have to be coded. Not only do they have to be coded, but they have to have assertions written that will effectively confirm if the step has passed, or if it fails, and why.
Since the book is primarily based on Cucumber, there is a large section that covers Cucumber fundamentals, including basic Gherkin (the underlying syntax that Cucumber uses), and the ability of using expressive options such as Scenario Outlines, Data tables, Doc Strings, tags, and dealing with some of the pain points seen in your tests (such as "flickering scenarios", where the tests pass some of the time but fail some times, too). More than just using Cucumber to define steps and have step definitions defined, the third part of the book deals with applying Cucumber to a number of different technologies; working with various databases, testing with RESTful web services, working with Rails, running tests and using capybara to simulate common browser actions and many other options that may come to play in your everyday testing life.
If you have ever been interested in looking at Cucumber and your testing environment is built around Ruby, then this will be an ideal book to use. If you are interested in deploying Cucumber in another type of environment, such as testing with Java or .NET, many of the ideas in this book will also carry over, but have a look at "The Secret Ninja Cucumber Scrolls" by David de Florinier and Gojko Adzic. It provides information about how to apply Cucumber to those environments. Regardless of your particular focus and environment needs, for a practical and effective book for learning and using Cucumber in a meaningful way, The Cucumber Book is an excellent addition to any tester or developer's library.
on May 11, 2013
The book's title might lead one to believe that its contents are only for people that use the Cucumber tool for BDD with Ruby, when in fact the authors cover most of their topics in such a way that most of the principles can be applied to whichever BDD tool and programming language one is using.
Although the book is geared towards a more technical reader, the authors offer what I think are some of the best general overviews of BDD available.
The book is sliced into three main parts:
Part 1 - Cucumber Fundamentals
Part 2 - Working Example
Part 3 - Cucumber Applied
I would recommend this book to anyone who is new to BDD, as well as enginers who are familiar with Cucumber or BDD but are looking to expand their skills. The biggest benefit for me was that after reading it I feel I have the information I need to successfully create killer automation for my next BDD project.
on June 19, 2016
What a joke! Using this approach will lead your project into the abyss of ridiculousness. You will never use this process in the real world to any great effect. This might be useful for a novice business analyst who doesn't understand anything about performing business analysis. In my opinion, the cucumber process is a very misguided and ineffective analysis approach. Yes, it will provide a simple way to communicate with the users, but what exactly are you communicating that translates into real user or technical requirements. This approach will never be accepted in the real world were people actually know what they are doing. Therefore, for any aspiring BA's, take the time to learn proper business analysis methods. The Project Management Institute (PMI) offers a credential in business analysis. It would serve your long term best interest to learn a globally accepted and proven methodology instead of wasting your time with this cucumber nonsense.
on February 24, 2016
The book does a great job at explaining all the features of Cucumber and Gherkin in particular.
It's all in Ruby. But, Cucumber is a Ruby tool, so I guess you should expect as much. Nothing wrong with Ruby, just not my "native" language. I'm a .NET C# coder, so I use SpecFlow. Also, the example application they use is an overly simplistic ATM. I guess it's not bad if you go in with the perspective that they're showing you how to use Cucumber, and not how to do ATDD or BDD in general (which would require a much bigger book).
I would definitely purchase this book again.
on June 8, 2014
Cucumber was introduced at my work place and I needed a resource to come up to speed on it since I didn't have any prior background in it. This book filled the need nicely. For the most part, it's well written and the explanations are clear. In addition to covering functionality supported by cucumber, the book also has suggestions and examples on a wide range of issues including structuring files and folders in a project, integration with other libraries for testing web applications, REST based web services, command line applications, databases as well as adding tests to a legacy application. It also includes a worked example. The only caveat is that some of the code doesn't work. I typed in all the code in this book and tried all the examples and there are occasions where I had to apply minor fixes to make it work. In Chapter 9, section 9.3, page 161, in the Account class initialize method, transaction queue and balance store are instantiated. On page 164, the code for transaction processor also creates its own instance of transaction queue and balance store. Since each of the two components are using their own copy of the balance store and transaction queue, cucumber fails and the flickering example in section 9.4 can't be reproduced. The AJAX example in chapter 15 didn't work at all (the non-AJAX version worked fine). In addition, there are some typos in this book. For example, on page 257, about a third from top, it says "And finally Cucumber is happy:" followed by cucumber output which shows 1 scenario as failed. This book could have used more editorial oversight. Despite these shortcomings, the book however has a lot of useful information on BDD as well as Cucumber (especially for beginners) and therefore it's definitely worth taking a look.
on October 15, 2014
This is a good book for seeing the flow and scope of BDD.
I primarily develop in C#, so ideally I would have liked a book targeting C# instead of Ruby.
Even without being fluent in Ruby I was able to understand the development process being encouraged by the Cucumber tool.
For me Cucumber (the specific tool encouraging BDD) fills the most important gap between the idea in the mind of the customer and the concrete result of a running piece of code.
I liked the chapter 'When Cucumbers Go Bad' where the authors talk about specific problems they identified as they worked with Cucumber.
Some of the problems like 'Fixture Data' that they identify are ones that I recognize but had not thought of as a type of problem.
I thought sharing a set of test data among different tests was reducing the cost of running and maintaining tests, even though my use of that technique was spiraled out of control almost every time I got beyond 3 tests.
Overall the purchase and studying of this book was worth it.