The cucumber for java book

The cucumber for java book

Сумата се прибавя директно в кошницата

6.41 €

Количество
Бърза поръчка



Платформата не носи отговорност за авторските права и съдържанието на споделените в нея учебни материали. Ако споделен учебен материал нарушава Вашите авторски права се свържете с нас.

Contents
Foreword xi
 
Acknowledgments xiii
 
Preface xv
 
Part I — Cucumber Fundamentals
 
1. Why Cucumber? 3
 
Automated Acceptance Tests 4
 
Behaviour-Driven Development 4
 
Living Documentation 6
 
How Cucumber Works 7
 
What We Just Learned 8
 
2. First Taste 11
 
Understanding Our Goal 11
 
Creating a Feature 12
 
Creating Step Definitions 17
 
Implementing Our First Step Definition 19
 
Changing Cucumber's Output 20
 
Testing Our Checkout Class 21
 
Adding an Assertion 23
 
Making It Pass 25
 
What We Just Learned 28
 
3. Gherkin Basics 31
 
What’s Gherkin For? 31
 
Format and Syntax 34
 
Feature 35
 
Scenario 36

 

Comments 40
Spoken Languages 41
What We Just Learned 42
Step Definitions: From the Outside . . 45
Steps and Step Definitions 46
Capturing Arguments 51
Multiple Captures 55
Flexibility 56
Returning Results 58
What We Just Learned 66
Expressive Scenarios . . 69
Background 69
Data Tables 72
Scenario Outline 79
Too Much Information 84
Doc Strings 86
Staying Organized with Tags and Subfolders 87
What We Just Learned 90
Keeping Your Cucumbers Sweet . . 91
Feeling the Pain 92
Working Together 95
Caring for Your Tests 102
Stop the Line and Defect Prevention 110
What We Just Learned 112
 
Part II —A Worked Example
7. Step Definitions: On the Inside 117
 
Sketching Out the Domain Model 118
 
Staying Honest with Transforms 123
 
Adding Custom Helper Methods 127
 
Organizing the Code 134
 
Dependency Injection 137
 
What We Just Learned 138
 
8. Support Code 141
 
Fixing the Bug 142
 
Bootstrapping the User Interface 149

 

Making the Switch 151
 
Using Hooks 156
 
Getting to Green 160
 
What We Just Learned 166
 
9. Message Queues and Asynchronous Components . . . 169
 
Our New Asynchronous Architecture 169
 
How to Synchronize 170
 
Implementing the New Architecture 172
 
Fixing the Flickering Scenario 179
 
What We Just Learned 184
 
10. Databases 185
 
Iterative Database Development 185
 
Refactoring to Use a Database 188
 
Reading and Writing to the Database 194
 
Cleaning the Database with Transactions 199
 
Cleaning the Database with Truncation 202
 
What We Just Learned 204
 
11. Simplifying Design with Dependency Injection .... 205
 
DI and Cucumber 205
 
Improving Our Design Using DI 207
 
PicoContainer Is Almost Invisible 213
 
Moving to Guice 214
 
Spring in Your Steps 218
 
CDI with Weld 221
 
What We Just Learned 223
 
12. Working with Web Applications 225
 
Selenium WebDriver 225
 
Handling Failure 228
 
Reusing the Browser 233
 
Ajax 235
 
What We Just Learned 242
 
13. Keeping Your Features Fast 245
 
Partitioning Features and Scenarios 245
 
What Sort of Tests? 248
 
Environment-Specific Step Definitions 250
 
Changing Step Definitions Using Tags 253
 
What We Just Learned 256

 

14. Controlling Cucumber 259
 
Cucumber’s Runtime Options 259
 
Overriding Cucumber Options 265
 
Automating Cucumber 266
 
What We Just Learned 272
 
15. Working with a REST Web Service 273
 
Structure Your Step Definitions 274
 
Storing Some Fruit 275
 
Building a Skeleton Web Server 276
 
The Fruits of Our Labor 280
 
What We Just Learned 283
 
16. Working with Legacy Applications 285
 
Characterization Tests 286
 
Squashing Bugs 288
 
Adding New Behavior 289
 
Are Your Scenarios Sufficient? 291
 
What We Just Learned 292
 
Al. Installing Cucumber 293
 
Choosing Your JARs 293
 
External Dependencies 295
 
Console Colors on Windows 296
 
A2. Cucumber and Other JVM Languages 297
 
Groovy 298
 
Scala 302
 
Clojure 303
 
A3. Bibliography 307
 
Index 309

Свързани продукти