small medium large xlarge

Now in print: The Cucumber for Java Book

February 11, 2015

Happy Birthday today to Thomas Edison, born on this day in 1847. Did you know that Edison used to take a nap holding a cup of marbles or ball bearings? Just as he'd drift off, the clatter would wake him up—and he'd jot down the thought he was having.

Just “one weird trick” that helped him invent and file over 2,000 patents worldwide.

Well that, plus a lot of hard work. But here's a little something to make your own hard work easier: The Cucumber for Java Book: Behaviour-Driven Development for Testers and Developers, now in print and shipping from pragprog.com/book/srjcuc.

Get a copy for everyone on your team, and delight your users once more.

The Cucumber for Java Book: Behaviour-Driven Development for Testers and Developers

Until now it's been difficult for teams developing Java applications to learn how to benefit from Behaviour-Driven Development (BDD). This book changes all that by describing in detail how to use Cucumber to harness the power of plain language specifications in your development process.

In part 1, you'll discover how to use Cucumber's Gherkin DSL to describe the behavior your customers want from the system. You'll also learn how to write Java code that interprets those plain language specifications and checks them against your application. Part 2 guides you through a worked example, using Spring, MySQL, and Jetty. Enhanced chapters teach you how to use Selenium to drive your application and handle asynchronous Ajax calls, and new chapters cover Dependency Injection (DI) and advanced techniques to help keep your test suites fast. Part 3 shows you how to integrate Cucumber with your Continuous Integration (CI) system, work with a REST web service, and even use BDD with legacy applications.

Written by the creator of Cucumber and two of its most experienced users and contributors, The Cucumber for Java Book is an authoritative guide that will give you and your team all the knowledge you need to start using Cucumber with confidence.

Now available from pragprog.com/book/srjcuc.

The Cucumber for Java Book – Q&A

What is Cucumber?

Cucumber lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests, and collaborative development-aid—all rolled into one format.

Who is this book for?

The first part of this book is for the whole team—customer, product owner, business analyst, developer, tester, architect, Scrum master, and anyone else you can think of. The rest of the book focuses on more technical aspects of Cucumber for Java and is suitable mainly for developers and testers.

How will this book help us at work?

Seb, Matt, and Aslak have spent years consulting in a wide variety of organizations. In response, we developed Cucumber to help support the effective ways of working that we had learned. In this book you get the distillation of all that knowledge, along with in-depth advice that will help you be successful at Behaviour-Driven Development (BDD) using Cucumber.

Can’t I learn all this from the online documentation?

The online documentation gives you the bare bones of how Cucumber for Java works. This book has much more. From the invaluable BDD advice in part 1, through the extensive worked example in part 2, to the detailed technical insights in part 3, this book collects everything you need to know in one handy package.

Is the book useful even if my project isn’t written in Java?

Cucumber doesn’t care what language your project is written in. As long as there’s a way to interface with your project from Java, then Cucumber for Java can work for you. If your project is written in Java (or another JVM language), then your Cucumber scenarios can interact directly with the code, which can be very useful. The book also gives a brief introduction to writing your “glue” code in other JVM languages, such as Scala, Groovy, or Clojure.

Is this the same as The Cucumber Book?

The Cucumber for Java Book is based upon the best-selling original, The Cucumber Book. All the examples have been completely rewritten to take advantage of the Java version of Cucumber. There are new chapters that cover Java specific topics, such as Cucumber’s integration with various dependency injection containers, and there’s a brand new chapter on how to keep your Cucumber scenarios running fast as your project grows.

Is Cucumber just another test automation tool?

No it isn’t. Cucumber is a collaboration and documentation tool first. Start by getting your business people to collaborate effectively with your technical teams. Then use Cucumber to document those interactions as described in the book. Finally, automate those interactions using Cucumber to get the full value from your improved development process. Teams that try to use Cucumber only as a test automation tool generally find that it is the wrong tool—because that’s not what it was designed for.

Now available from pragprog.com/book/srjcuc.

Upcoming Author Appearances

  • 2015-02-27 Rachel Davies, NorDevCon, Norwich, UK
  • 2015-02-28 Adam Tornhill, Beauty in Code, Malmö, Sweden
  • 2015-03-04 Adam Tornhill, QCon London 2015, UK
  • 2015-03-05 Rachel Davies, QCon London
  • 2015-03-09 Johanna Rothman, Booster Conference, Bergen, NO
  • 2015-03-09 Jamis Buck, Mountain West Ruby Conference, Salt Lake City, Utah
  • 2015-03-10 Johanna Rothman, Booster Conference, Bergen, NO
  • 2015-03-11 Johanna Rothman, Booster Conference, Bergen, NO
  • 2015-03-12 Johanna Rothman, Booster Conference, Bergen, NO
  • Did You Know?

    Please note our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. For us, "DRM Free" means "freedom": you should own the books you've paid for. On whatever device is handy—your laptop, iThingy, Blueberry, you name it. We think ideas should outlast any device you put them on.

    And you can always come back and re-download your books when needed, using your account on pragprog.com. We're here to make your life easier.

    Don't Get Left Out

    Are your friends jealous that you get these spiffy email newsletters and they don't? Clue them in that all they need to do is create an account on pragprog.com (email address and password is all it takes) and select the checkbox to receive newsletters.

    Are you following us on Twitter and/or Facebook? Here's where you can find us and keep up with the latest news and commentary, and occasional discounts:

    Tell your friends! Tweet this

    Follow us on Twitter: @pragprog, @pragpub, Andy @PragmaticAndy and Dave @pragdave.

    Coming Soon:

    • CoffeeScript, Second Edition in print
    • The Nature of Software Development: Keep It Simple, Make It Valuable, Build It Piece by Piece

    Recently Released:

    Thanks for your continued support,

    Dave & Andy The Pragmatic Programmers

    Books • eBooks • PragPub Magazine • Audiobooks and Screencasts
    PragProg.com