Sign up
Forgot password?
FAQ: Login

Wynne Matt, Hellesoy Aslak. The Cucumber Book. Behaviour driven development for testers and developers

  • pdf file
  • size 6,70 MB
  • added by
  • info modified
Wynne Matt, Hellesoy Aslak. The Cucumber Book. Behaviour driven development for testers and developers
Dallas, Texas, Raleigh, North Carolina - The Pragmatic Bookshelf - book version 1.0, January 2012 - 328 p.
ISBN13: 978-1-934356-80-7
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. The Cucumber Book dives straight into the core of the problem: communication between people. Cucumber saves the day; it’s a testing, communication, and requirements tool – all rolled into one.
About this Book
Matt Wynne and Aslak Hellesøy 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 customers happy, and not a line more. Although it was born in the Ruby community, you can use Cucumber to test almost any system, from a simple shell script or Perl script, to web applications written in PHP, Java, or any platform.
In Part 1, you’ll get started by using the core features of Cucumber and working with Cucumber’s Gherkin DSL to describe — in plain language — the behavior your customers want from the system. Then you’ll write Ruby code that interprets those plain-language specifications and checks them against your application. If you’re new to Cucumber, this part of the book will teach you everything you need to know to get started.
In Part 2, you’ll consolidate the knowledge you’ve gained with a worked example, where you’ll learn more advanced Cucumber techniques. You’ll also learn how to test asynchronous systems and systems that use a database.
In Part 3, you’ll find a selection of recipes for some of the most difficult and commonly seen situations the authors have helped teams solve. With these patterns and techniques, you’ll learn how to test Ajax-heavy web applications with Capybara and Selenium, REST web services, Ruby on Rails applications, command-line applications, legacy applications, and more.
Written by the creator of Cucumber and one of its most experienced users and contributors, The Cucumber Book is an authoritative guide that will give you and your team all the knowledge you need to start using Cucumber with confidence.
Part I — Cucumber Fundamentals
Why Cucumber?
-Automated Acceptance Tests
-Behaviour-Driven Development
-Living Documentation
-How Cucumber Works
-What We Just Learned
First Taste
-Understanding Our Goal
-Creating a Feature
-Creating Step Definitions
-Implementing Our First Step Definition
-Running Our Program
-Changing Formatters
-Adding an Assertion
-Making It Pass
-What We Just Learned
Gherkin Basics
-What’s Gherkin For?
-Format and Syntax
-Feature
-Scenario
-Comments
-Spoken languages
-What We Just Learned
Step Definitions: From the Outside
-Steps and Step Definitions
-Capturing Arguments
-Multiple Captures
-Flexibility
-Returning Results
-What We Just Learned
Expressive Scenarios
-Background
-Data Tables
-Scenario Outline
-Nesting Steps
-Doc Strings
-Staying Organized with Tags and Subfolders
-What We Just Learned
When Cucumbers Go Bad
-Feeling the Pain
-Working Together
-Caring for Your Tests
-Stop the Line and Defect Prevention
-What We Just Learned
Part II — A Worked Example
Step Definitions: On the Inside
-Sketching Out the Domain Model
-Removing Duplication with Transforms
-Adding Custom Helper Methods to the World
-Organizing the Code
-What We Just Learned
Support Code
-Fixing the Bug
-Bootstrapping the User Interface
-Making the Switch
-Using Hooks
-Building the User Interface
-What We Just Learned
Dealing with Message Queues and Asynchronous Components
-Our New Asynchronous Architecture
-How to Synchronize
-Implementing the New Architecture
-Fixing the Flickering Scenario
-What We Just Learned
Databases
-Introducing ActiveRecord
-Refactoring to Use a Database
-Reading and Writing to the Database
-Cleaning the Database with Transactions
-Cleaning the Database with Truncation
-What We Just Learned
Part III — Cucumber Applied
The Cucumber Command-Line Interface
-Cucumber’s Command-Line Options
-Running a Subset of Scenarios
-Changing Cucumber’s Output
-Specifying the Location of Step Definitions
-Managing Your Work in Progress (WIP)
-Using Profiles
-Running Cucumber from Rake
-Running Cucumber in Continuous Integration
-What We Just Learned
Testing a REST Web Service
-In-Process Testing of Rack-Based REST APIs
-Out-of-Process Testing of Any REST API
-What We Just Learned
Adding Tests to a Legacy Application
-Characterization Tests
-Squashing Bugs
-Adding New Behavior
-Code Coverage
-What We Just Learned
Bootstrapping Rails
-Running the Generators
-Creating a User
-Posting a Message
-Associating a Message with a User
-Creating a Controller by Hand
-Implementing the View
-What We Just Learned
-Try this
Using Capybara to Test Ajax Web Applications
-Implementing a Simple Search Without Ajax
-Searching with Ajax
-The Capybara API
-Taking Screenshots
-What We Just Learned
Testing Command-Line Applications with Aruba
-Simple Interfaces
-Our First Aruba Feature
-Working with Files and Executables
-Interacting with User Input
-Using Aruba’s Ruby DSL
-What We Just Learned
-Using Cucumber with Other Platforms
-Installing Cucumber
-Installing Ruby
-HTTP Proxy Settings
-Installing Bundler
-Installing Cucumber (and RSpec)
-Installing Other Gems
-Choosing a Text Editor
-Ruby Gem Versions
-Bibliography
  • Sign up or login using form at top of the page to download this file.
  • Sign up
Up