๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

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

โœ Scribed by Seb Rose; Matt Wynne; Aslak Hellesoy


Publisher
Pragmatic Bookshelf
Year
2015
Tongue
English
Leaves
325
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Teams working on the JVM can now say goodbye forever to misunderstood requirements, tedious manual acceptance tests, and out-of-date documentation. Cucumber - the popular, open-source tool that helps teams communicate more effectively with their customers - now has a Java version, and our bestsellingCucumber Bookhas been updated to match.The Cucumber for Java Bookhas the same great advice about how to deliver rock-solid applications collaboratively, but with all code completely rewritten in Java. New chapters cover features unique to the Java version of Cucumber, and reflect insights from the Cucumber team since the original book was published.

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 Bookis an authoritative guide that will give you and your team all the knowledge you need to start using Cucumber with confidence.

โœฆ Table of Contents


Cover......Page 1
Table of Contents......Page 8
Foreword......Page 12
Acknowledgments......Page 14
Preface......Page 16
Who This Book Is For......Page 17
How This Book Is Organized......Page 18
Running the Code Examples......Page 19
Online Resources......Page 20
Part I?Cucumber Fundamentals......Page 21
1. Why Cucumber?......Page 22
Behaviour-Driven Development......Page 23
Living Documentation......Page 25
How Cucumber Works......Page 26
What We Just Learned......Page 27
Understanding Our Goal......Page 29
Creating a Feature......Page 30
Creating Step Definitions......Page 35
Implementing Our First Step Definition......Page 37
Changing Cucumber's Output......Page 38
Testing Our Checkout Class......Page 39
Adding an Assertion......Page 41
Making It Pass......Page 43
What We Just Learned......Page 46
What's Gherkin For?......Page 48
Format and Syntax......Page 51
Feature......Page 52
Scenario......Page 53
Comments......Page 57
Spoken Languages......Page 58
What We Just Learned......Page 59
4. Step Definitions: From the Outside......Page 61
Steps and Step Definitions......Page 62
Capturing Arguments......Page 67
Multiple Captures......Page 71
Flexibility......Page 72
Returning Results......Page 74
What We Just Learned......Page 82
Background......Page 84
Data Tables......Page 87
Scenario Outline......Page 94
Too Much Information......Page 99
Doc Strings......Page 101
Staying Organized with Tags and Subfolders......Page 102
What We Just Learned......Page 105
6. Keeping Your Cucumbers Sweet......Page 106
Feeling the Pain......Page 107
Working Together......Page 110
Caring for Your Tests......Page 117
Stop the Line and Defect Prevention......Page 125
What We Just Learned......Page 127
Part II?A Worked Example......Page 129
7. Step Definitions: On the Inside......Page 130
Sketching Out the Domain Model......Page 131
Staying Honest with Transforms......Page 136
Adding Custom Helper Methods......Page 140
Organizing the Code......Page 147
Dependency Injection......Page 150
What We Just Learned......Page 151
8. Support Code......Page 153
Fixing the Bug......Page 154
Bootstrapping the User Interface......Page 161
Making the Switch......Page 163
Using Hooks......Page 168
Getting to Green......Page 172
What We Just Learned......Page 178
Our New Asynchronous Architecture......Page 180
How to Synchronize......Page 181
Implementing the New Architecture......Page 183
Fixing the Flickering Scenario......Page 190
What We Just Learned......Page 195
Iterative Database Development......Page 196
Refactoring to Use a Database......Page 199
Reading and Writing to the Database......Page 205
Cleaning the Database with Transactions......Page 210
Cleaning the Database with Truncation......Page 213
What We Just Learned......Page 215
DI and Cucumber......Page 216
Improving Our Design Using DI......Page 218
PicoContainer Is Almost Invisible......Page 224
Moving to Guice......Page 225
Spring in Your Steps......Page 229
CDI with Weld......Page 232
What We Just Learned......Page 234
Selenium WebDriver......Page 235
Handling Failure......Page 238
Reusing the Browser......Page 243
Ajax......Page 245
What We Just Learned......Page 252
Partitioning Features and Scenarios......Page 254
What Sort of Tests?......Page 257
Environment-Specific Step Definitions......Page 259
Changing Step Definitions Using Tags......Page 262
What We Just Learned......Page 265
Part III?More Techniques......Page 266
Cucumber's Runtime Options......Page 267
Overriding Cucumber Options......Page 273
Automating Cucumber......Page 274
What We Just Learned......Page 280
15. Working with a REST Web Service......Page 281
Structure Your Step Definitions......Page 282
Storing Some Fruit......Page 283
Building a Skeleton Web Server......Page 284
The Fruits of Our Labor......Page 288
What We Just Learned......Page 291
16. Working with Legacy Applications......Page 293
Characterization Tests......Page 294
Squashing Bugs......Page 296
Adding New Behavior......Page 297
Are Your Scenarios Sufficient?......Page 299
What We Just Learned......Page 300
Choosing Your JARs......Page 301
External Dependencies......Page 303
Console Colors on Windows......Page 304
A2. Cucumber and Other JVM Languages......Page 305
Groovy......Page 306
Scala......Page 310
Clojure......Page 311
A3. Bibliography......Page 314
? B ?......Page 316
? D ?......Page 317
? J ?......Page 318
? R ?......Page 319
? T ?......Page 320
? X ?......Page 321


๐Ÿ“œ SIMILAR VOLUMES


The Cucumber for Java Book: Behaviour-Dr
โœ Seb Rose, Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<div><p>Teams working on the JVM can now say goodbye forever to misunderstood requirements, tedious manual acceptance tests, and out-of-date documentation. Cucumber - the popular, open-source tool that helps teams communicate more effectively with their customers - now has a Java version, and our be

The Cucumber for Java Book: Behaviour-Dr
โœ Seb Rose, Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<div><p>Teams working on the JVM can now say goodbye forever to misunderstood requirements, tedious manual acceptance tests, and out-of-date documentation. Cucumber - the popular, open-source tool that helps teams communicate more effectively with their customers - now has a Java version, and our be

The Cucumber for Java Book: Behaviour-Dr
โœ Seb Rose, Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› The Pragmatic Programmers ๐ŸŒ English

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,

The Cucumber Book: Behaviour-Driven Deve
โœ Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<DIV><p>Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can't always articulate their ideas clearly enough for you to turn them into code. <I>The Cucumber Book</I> dives straight into the core of the problem: communication between people. Cucum

The Cucumber Book: Behaviour-Driven Deve
โœ Aslak Hellesoy, Matt Wynne ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› The Pragmatic Programmers ๐ŸŒ English

Matt Wynne and Aslak Hellesoy show you how to express your customers wild ideas as a set of clear, executable specifications that everyone on the team can read. You'll learn how to feed those examples into Cucumber and let it guide your development. You'll build just the right code to keep your cust

The Cucumber Book: Behaviour-Driven Deve
โœ Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<DIV><p>Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can't always articulate their ideas clearly enough for you to turn them into code. <I>The Cucumber Book</I> dives straight into the core of the problem: communication between people. Cucum