The Cucumber Book

Book description

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.

Table of contents

  1. The Cucumber Book
    1. Copyright
    2. For the Best Reading Experience...
    3. Table of Contents
    4. What Readers Are Saying About The Cucumber Book
    5. Foreword
    6. Acknowledgments
    7. Preface
      1. Who This Book Is For
      2. Why You Should Listen to Us
      3. How This Book Is Organized
      4. What Is Not in This Book
      5. Running the Code Examples
      6. Getting Help
    8. Part 1: Cucumber Fundamentals
      1. Chapter 1: Why Cucumber?
        1. Automated Acceptance Tests
        2. Behaviour-Driven Development
        3. Living Documentation
        4. How Cucumber Works
        5. What We Just Learned
      2. Chapter 2: First Taste
        1. Understanding Our Goal
        2. Creating a Feature
        3. Creating Step Definitions
        4. Implementing Our First Step Definition
        5. Running Our Program
        6. Changing Formatters
        7. Adding an Assertion
        8. Making It Pass
        9. What We Just Learned
      3. Chapter 3: Gherkin Basics
        1. What’s Gherkin For?
        2. Format and Syntax
        3. Feature
        4. Scenario
        5. Comments
        6. Spoken Languages
        7. What We Just Learned
      4. Chapter 4: Step Definitions: From the Outside
        1. Steps and Step Definitions
        2. Capturing Arguments
        3. Multiple Captures
        4. Flexibility
        5. Returning Results
        6. What We Just Learned
      5. Chapter 5: Expressive Scenarios
        1. Background
        2. Data Tables
        3. Scenario Outline
        4. Nesting Steps
        5. Doc Strings
        6. Staying Organized with Tags and Subfolders
        7. What We Just Learned
      6. Chapter 6: When Cucumbers Go Bad
        1. Feeling the Pain
        2. Working Together
        3. Caring for Your Tests
        4. Stop the Line and Defect Prevention
        5. What We Just Learned
    9. Part 2: A Worked Example
      1. Chapter 7: Step Definitions: On the Inside
        1. Sketching Out the Domain Model
        2. Removing Duplication with Transforms
        3. Adding Custom Helper Methods to the World
        4. Organizing the Code
        5. What We Just Learned
      2. Chapter 8: Support Code
        1. Fixing the Bug
        2. Bootstrapping the User Interface
        3. Making the Switch
        4. Using Hooks
        5. Building the User Interface
        6. What We Just Learned
      3. Chapter 9: Dealing with Message Queues and Asynchronous Components
        1. Our New Asynchronous Architecture
        2. How to Synchronize
        3. Implementing the New Architecture
        4. Fixing the Flickering Scenario
        5. What We Just Learned
      4. Chapter 10: Databases
        1. Introducing ActiveRecord
        2. Refactoring to Use a Database
        3. Reading and Writing to the Database
        4. Cleaning the Database with Transactions
        5. Cleaning the Database with Truncation
        6. What We Just Learned
    10. Part 3: Cucumber Applied
      1. Chapter 11: The Cucumber Command-Line Interface
        1. Cucumber’s Command-Line Options
        2. Running a Subset of Scenarios
        3. Changing Cucumber’s Output
        4. Specifying the Location of Step Definitions
        5. Managing Your Work in Progress (WIP)
        6. Using Profiles
        7. Running Cucumber from Rake
        8. Running Cucumber in Continuous Integration
        9. What We Just Learned
      2. Chapter 12: Testing a REST Web Service
        1. In-Process Testing of Rack-Based REST APIs
        2. Out-of-Process Testing of Any REST API
        3. What We Just Learned
      3. Chapter 13: Adding Tests to a Legacy Application
        1. Characterization Tests
        2. Squashing Bugs
        3. Adding New Behavior
        4. Code Coverage
        5. What We Just Learned
      4. Chapter 14: Bootstrapping Rails
        1. Running the Generators
        2. Creating a User
        3. Posting a Message
        4. Associating a Message with a User
        5. Creating a Controller by Hand
        6. Implementing the View
        7. What We Just Learned
        8. Try this
      5. Chapter 15: Using Capybara to Test Ajax Web Applications
        1. Implementing a Simple Search Without Ajax
        2. Searching with Ajax
        3. The Capybara API
        4. Taking Screenshots
        5. What We Just Learned
      6. Chapter 16: Testing Command-Line Applications with Aruba
        1. Simple Interfaces
        2. Our First Aruba Feature
        3. Working with Files and Executables
        4. Interacting with User Input
        5. Using Aruba’s Ruby DSL
        6. What We Just Learned
    11. Appendix 1: Using Cucumber with Other Platforms
    12. Appendix 2: Installing Cucumber
      1. Installing Ruby
      2. HTTP Proxy Settings
      3. Installing Bundler
      4. Installing Cucumber (and RSpec)
      5. Installing Other Gems
      6. Choosing a Text Editor
    13. Appendix 3: Ruby Gem Versions
    14. Appendix 4: Bibliography
      1. You May Be Interested In…

Product information

  • Title: The Cucumber Book
  • Author(s):
  • Release date: January 2012
  • Publisher(s): Pragmatic Bookshelf
  • ISBN: 9781934356807