Developer's Reading List
, March 13, 2012 The best books to recently roll of the presses cover malware analysis, test automation, C#, and programming your home.
The Cucumber Book
Matt Wynne and Aslak Hellesoy
Pragmatic Bookshelf
Behavior-driven development (BDD) is enjoying something of a renaissance as more developers recognize its benefits. Its advantages include the ability to capture user requirements in a script (using a customized DSL) that can be executed later against the evolving software to validate it. BDD tests are often comprehensive UATs recorded as use cases. They rely on language similar to: "Given a situation in which A, B, and C are true, when X happens, then Y and Z should occur." These scripts are then gathered into scenarios that test the app’s functionality across multiple components.
Cucumber is one of several well-regarded BDD frameworks. It runs primarily on Ruby (but can be jimmied easily enough to work with projects in Java and other languages). It follows in the footsteps of easyb (which won the Jolt Award in 2009) RSpec, JBehave, and several others.
This book is an excellent introduction both to BDD and the Cucumber tool. It explains in a clear style how to capture the requirements, write the tests, run them, and manage them as the project rolls along. In addition, handling sometimes difficult testing situations (configuring databases and resetting them afterwards), REST interface testing, and, of course, web interfaces are all explained simply and straightforwardly by authors who have clearly spent a lot of time working through these problems.
My only hesitation is that the book does not describe mock objects. In fact, mocks do not appear at all in the index and stubs have one entry only. Yet the ability to run BDD scenarios on an incomplete project relies heavily on the ability to mock the missing pieces. The author dance around this by creating stubs (essentially skeleton objects), but without recognizing or exploring the deeper needs that this step implies.
Otherwise, though, an excellent book that is highly recommended. — A. Binstock

