Cucumber Recipes: Automate Anything with BDD Tools and Techniques

You can test just about anything with Cucumber. We certainly have, and in Cucumber Recipes we'll show you how to apply our hard-won field experience to your own projects. Once you've mastered the basics, this book will show you how to get the most out of Cucumber--from specific situations to advanced test-writing advice. With over forty practical recipes, you'll test desktop, web, mobile, and server applications across a variety of platforms. This book gives you tools that you can use today to automate any system that you encounter, and do it well.

The Cucumber Book showed you how your team can work together to write executable specifications--documents that tell a clear story and also happen to be working test code. We'll arm you with ready-rolled solutions to real-world problems: your tests will run faster, read more clearly, and work in any environment.

Our first tips will help you fit Cucumber into your workflow. Powerful filters will tame tables full of test data, transforming them into the format your application needs. IPS output formatters will generate reports for any occasion. Continuous Integration servers will run your Cucumber tests every time the code changes. Next, you'll find recipes tailored to the platform you're running on. Ever wanted to know how to test a Grails app from Cucumber? Need to put a Windows program through its paces? How about a mobile app running on Android or iOS? We'll show you how to do all of these.

Throughout the book, you'll see how to make Cucumber sing as you interoperate with different platforms, languages, and environments. From embedded circuits to Python and PHP web apps, Cucumber has something for you.

What You Need:

You'll need basic working knowledge of Cucumber and Ruby. Individual recipes may have additional requirements; for example, a recipe on Windows automation might pull in an open source GUI driver.

We've written the recipes for compatibility with Ruby 1.9.3 and 1.8.7, plus Cucumber 1.1.4. Other versions may work as well, but these are the ones we test with.

1112919182
Cucumber Recipes: Automate Anything with BDD Tools and Techniques

You can test just about anything with Cucumber. We certainly have, and in Cucumber Recipes we'll show you how to apply our hard-won field experience to your own projects. Once you've mastered the basics, this book will show you how to get the most out of Cucumber--from specific situations to advanced test-writing advice. With over forty practical recipes, you'll test desktop, web, mobile, and server applications across a variety of platforms. This book gives you tools that you can use today to automate any system that you encounter, and do it well.

The Cucumber Book showed you how your team can work together to write executable specifications--documents that tell a clear story and also happen to be working test code. We'll arm you with ready-rolled solutions to real-world problems: your tests will run faster, read more clearly, and work in any environment.

Our first tips will help you fit Cucumber into your workflow. Powerful filters will tame tables full of test data, transforming them into the format your application needs. IPS output formatters will generate reports for any occasion. Continuous Integration servers will run your Cucumber tests every time the code changes. Next, you'll find recipes tailored to the platform you're running on. Ever wanted to know how to test a Grails app from Cucumber? Need to put a Windows program through its paces? How about a mobile app running on Android or iOS? We'll show you how to do all of these.

Throughout the book, you'll see how to make Cucumber sing as you interoperate with different platforms, languages, and environments. From embedded circuits to Python and PHP web apps, Cucumber has something for you.

What You Need:

You'll need basic working knowledge of Cucumber and Ruby. Individual recipes may have additional requirements; for example, a recipe on Windows automation might pull in an open source GUI driver.

We've written the recipes for compatibility with Ruby 1.9.3 and 1.8.7, plus Cucumber 1.1.4. Other versions may work as well, but these are the ones we test with.

28.99 In Stock
Cucumber Recipes: Automate Anything with BDD Tools and Techniques

Cucumber Recipes: Automate Anything with BDD Tools and Techniques

Cucumber Recipes: Automate Anything with BDD Tools and Techniques

Cucumber Recipes: Automate Anything with BDD Tools and Techniques

eBook

$28.99 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

You can test just about anything with Cucumber. We certainly have, and in Cucumber Recipes we'll show you how to apply our hard-won field experience to your own projects. Once you've mastered the basics, this book will show you how to get the most out of Cucumber--from specific situations to advanced test-writing advice. With over forty practical recipes, you'll test desktop, web, mobile, and server applications across a variety of platforms. This book gives you tools that you can use today to automate any system that you encounter, and do it well.

The Cucumber Book showed you how your team can work together to write executable specifications--documents that tell a clear story and also happen to be working test code. We'll arm you with ready-rolled solutions to real-world problems: your tests will run faster, read more clearly, and work in any environment.

Our first tips will help you fit Cucumber into your workflow. Powerful filters will tame tables full of test data, transforming them into the format your application needs. IPS output formatters will generate reports for any occasion. Continuous Integration servers will run your Cucumber tests every time the code changes. Next, you'll find recipes tailored to the platform you're running on. Ever wanted to know how to test a Grails app from Cucumber? Need to put a Windows program through its paces? How about a mobile app running on Android or iOS? We'll show you how to do all of these.

Throughout the book, you'll see how to make Cucumber sing as you interoperate with different platforms, languages, and environments. From embedded circuits to Python and PHP web apps, Cucumber has something for you.

What You Need:

You'll need basic working knowledge of Cucumber and Ruby. Individual recipes may have additional requirements; for example, a recipe on Windows automation might pull in an open source GUI driver.

We've written the recipes for compatibility with Ruby 1.9.3 and 1.8.7, plus Cucumber 1.1.4. Other versions may work as well, but these are the ones we test with.


Product Details

ISBN-13: 9781680503364
Publisher: The Pragmatic Programmers
Publication date: 02/12/2013
Sold by: Barnes & Noble
Format: eBook
Pages: 272
File size: 9 MB

About the Author

Ian Dees was first bitten by the programming bug in 1986 on a Timex Sinclair 1000, and has been having a blast in his software apprenticeship ever since. By day, Ian slings code, tests, and puns at a Portland-area test equipment manufacturer. By night, he converts espresso into programming books, including Scripted GUI Testing With Ruby and Using JRuby.


Matt Wynne is a leading BDD practitioner, a member of the Cucumber core team, and a programmer, coach, trainer, and popular international speaker. Alongside Aslak Hellesøy and Julien Biezemans, Matt is co-founder of Cucumber Ltd., the company behind Cucumber. Matt tweets from @mattwynne and @cucumberbdd.


Aslak Hellesoy is the creator of Cucumber. During his career Aslak has worked with both small and large organizations in industries such as telecom, trading, insurance, car manufacturing, education, and government. Aslak is co-founder of Cucumber Ltd, the company behind Cucumber. He tweets from @aslak_hellesoy and @cucumberbdd.

Table of Contents

Foreword vii

Acknowledgments xi

Introduction xiii

1 Cucumber Techniques 1

Recipe 1 Compare and Transform Tables of Data 2

Recipe 2 Generate an RTF Report with a Custom Formatter 7

Recipe 3 Run Slow Setup/Teardown Code with Global Hooks 13

Recipe 4 Refactor to Extract Your Own Application Driver DSL 18

Recipe 5 Define Steps as Regular Ruby Methods 22

Recipe 6 Compare Images 27

Recipe 7 Test Across Multiple Cores 33

Recipe 8 Test Across Multiple Machines with SSH 36

Recipe 9 Run Your Features Automatically with Guard and Growl 41

Recipe 10 Add Cucumber to Your Continuous Integration Server 47

Recipe 11 Publish Your Documentation on Relish 55

Recipe 12 Test Through Multiple Interfaces Using Worlds 61

Recipe 13 Manipulate Time 67

Recipe 14 Drive Cucumber's Wire Protocol 72

Recipe 15 Implement a Wire Protocol Listener 75

2 Java 83

Recipe 16 Use Cucumber Directly with JRuby 84

Recipe 17 Use Cucumber with Java via Cucumber-JVM 87

Recipe 18 Drive a Spring + Hibernate Project 92

Recipe 19 Test a Grails App Using grails-cucumber 99

Recipe 20 Test Scala Code 104

Recipe 21 Test Clojure Code 109

Recipe 22 Drive a Swing Interface with FEST 111

3 NET and Windows 117

Recipe 23 Get Good Text Output on Windows 118

Recipe 24 Test .NET Code with SpecFlow 124

Recipe 25 Drive a Windows App Using White 130

Recipe 26 Test Windows GUIs with AutoIt 135

Recipe 27 Test on Windows Phone 139

4 Mobile and Web 147

Recipe 28 Test on iOS Using Frank 148

Recipe 29 Test Android Apps with Calabash 153

Recipe 30 Parse HTML Tables 160

Recipe 31 Drive JavaScript/CoffeeScript Using Cucumber-JS 164

Recipe 32 Test a Web App Using Watir 168

Recipe 33 Test a PHP App with cuke4php 173

Recipe 34 Play Back Canned Network Data Using VCR 181

Recipe 35 Drive a Flash App Using Cuke4AS3 185

Recipe 36 Monitor a Web Service Using Nagios and Cucumber 195

5 Other Languages and Platforms 201

Recipe 37 Drive a Mac GUI Using AppleScript and System Events 202

Recipe 38 Drive a Mac GUI Using MacRuby and AXElements 209

Recipe 39 Test Python Code Using Lettuce 214

Recipe 40 Test Erlang Code 217

Recipe 41 Test Lua Code Using cucumber-lua 221

Recipe 42 Test a GUI on Linux, Mac, or Windows with Sikuli 225

Recipe 43 Test an Arduino Project Using Serial 230

A1 RSpec Expectations 237

A1.1 Basics 237

A1.2 Custom Matchers 238

A1.3 Alternatives 239

Bibliography 241

Index 243

From the B&N Reads Blog

Customer Reviews