- Amazon Student members save an additional 10% on Textbooks with promo code TEXTBOOK10. Enter code TEXTBOOK10 at checkout. Here's how (restrictions apply)
The Cucumber Book: Behaviour-Driven Development for Testers and Developers Paperback – Feb 10 2012
|New from||Used from|
Special Offers and Product Promotions
Frequently Bought Together
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
To get the free app, enter your e-mail address or mobile phone number.
""To those of you wondering how to use Cucumber effectively, The Cucumber Book is the answer. Not content to write just a testing book, Aslak and Matt have packed it with practical insights on many aspects of software development. Studying this book will make you a better software developer.""--Pat Maddox, B.D.D.M.F., RSpec Core team""Teams can use Cucumber to get a better understanding of what software to build for their customers. In this book, Aslak and Matt do a brilliant job explaining how you get started with Cucumber with plenty of easy-to-follow examples.""--Rachel Davies, Author, "Agile Coaching"""I devoured the Cucumber book on a train ride from Grenoble to Brussels a few days after watching Matt's presentation "BDD As It's Meant to Be Done." These two resources helped me understand in just a few hours how to avoid dozens of common mistakes writing scenarios in the Cucumber style. It's as though I received an injection of perhaps two years of experience writing scenarios poorly so that I didn't have to go through it all myself. What a gift. I recommend this book to everyone working with Cucumber.""--J. B. Rainsberger, Author, "JUnit Recipes"
About the Author
Matt Wynne works as an independent consultant, helping teams like yours learn to enjoy delivering software to the best of their abilities. In his spare time he is a core developer on the Cucumber project, and he blogs at http://blog.mattwynne.net and tweets as @mattwynne
Aslak Hellesoy is the founder of the Cucumber project and works as a senior developer with DRW Trading in London, writing very fast and very smart software in several different programming languages. In his previous job he was the Chief Scientist of BEKK Consulting in Norway. Aslak tweets as @aslak_hellesoy.
Inside This Book(Learn More)
Most Helpful Customer Reviews on Amazon.com (beta)
The Cucumber book consists of 3 different parts. The first part is an basic introduction to Cucumber, the second part provides a 3-chapter long example and the last part shows how to test different type of application.
Part one starts by introducing the concepts of BDD (or A-TDD or "Specification by Example" which are all very similar) and explains that cucumber, in the end, is a collaboration tool where the developers, testers and users learn to speak the same language and that way improve development of software. Cucumber provides a way of expressing and automating that shared language. The next couple of chapters introduce the basic features of cucumber one at the time. The last chapter of the first part talks about common test automation problems and that their causes are and what you can do about this. Most of this chapter and the concepts expressed in the book are valid for any of the BDD/A-TDD frameworks such as Fitnesse or RobotFramework.
Part two started out disappointing to me. The authors decided to use an ATM as example of their test. ATMs has frequently been used in software development books (like calculators, which unfortunately it also used) and I had hoped for a different, less stereotypical, domain. Yet, as part two progressed, I started liking the example more and eventually part two became my favorite part of the book. Its style reminded me of the excellent Growing Object-Oriented Software, Guided by Tests. The example starts by writing tests that directly talk to the application domain logic. After getting the logic to work, they switch the interface to a web interface without making a change to the written specifications (excellent!) and clearly show that the specification and application logic are and should be separated. After this they explain how to deal with asynchronous events and testing with a database.
Part three is sort-of the left-over chapter of what the authors still wanted to say about cucumber that didn't fit in the other chapters. It starts with exploring the command line options to cucumber and then dives into testing different type of applications, namely: REST, legacy, rails, ajax and CLI. Each of these chapters (except legacy code) provides excellent examples of working outside-in with cucumber specifications and each chapter introduces additional useful ruby (testing) tools.
So, in the end, I was positively surprised about the book and enjoyed every page. What drawbacks does the book have? The collaborative part of BDD was only stressed in the first couple of chapters, which was too bad. As mentioned, I found the examples a bit too stereotypical. I guess the book wouldn't be easy to read for non-ruby developers as there is a fair amount of ruby code in it and the alternative language cucumber clones aren't covered. Yet, I found these drawbacks minimal and would still rate it 5 stars. For explaining BDD (A-TDD/Specification by Example), I'd still recommend Gojko Adzic's Specification by Example: How Successful Teams Deliver the Right Software over the cucumber book. But Specification by Example: How Successful Teams Deliver the Right Software doesn't cover the concrete implementation in a tool, for that, I'd definitively recommend the cucumber book. They compliment each other nicely.
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.
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.
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.
Look for similar items by category
- Books > Computers & Technology > Computer Science > Systems Analysis & Design
- Books > Computers & Technology > Programming > Languages & Tools
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Software Development
- Books > Textbooks > Computer Science & Information Systems > Programming Languages