Home Page Icon
Home Page
Table of Contents for
Part II. A Worked Example
Close
Part II. A Worked Example
by Steve Tooke, Aslak Hellesoy, Matt Wynne
The Cucumber Book, 2nd Edition
 Foreword
 Acknowledgments
 Preface
Who This Book Is For
Why You Should Listen to Us
How This Book Is Organized
What Is Not in This Book
Running the Code Examples
Getting Help
Part I. Cucumber Fundamentals
1. Why Cucumber?
Automated Acceptance Tests
Behaviour-Driven Development
Living Documentation
How Cucumber Works
What We Just Learned
2. 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
3. Gherkin Basics
What’s Gherkin For?
Format and Syntax
Feature
Scenario
Comments
Spoken Languages
What We Just Learned
4. Step Definitions: From the Outside
Steps and Step Definitions
Capturing Arguments
Multiple Captures
Flexibility
Returning Results
What We Just Learned
5. Expressive Scenarios
Background
Data Tables
Scenario Outline
Nesting Steps
Doc Strings
Staying Organized with Tags and Subfolders
What We Just Learned
6. 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
7. 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
8. Support Code
Fixing the Bug
Bootstrapping the User Interface
Making the Switch
Using Hooks
Building the User Interface
What We Just Learned
9. 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
10. 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
11. 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
12. 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
13. Adding Tests to a Legacy Application
Characterization Tests
Squashing Bugs
Adding New Behavior
Code Coverage
What We Just Learned
14. 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
15. 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
16. 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
A1. Using Cucumber with Other Platforms
A2. Installing Cucumber
Installing Ruby
HTTP Proxy Settings
Installing Bundler
Installing Cucumber (and RSpec)
Installing Other Gems
Choosing a Text Editor
A3. Ruby Gem Versions
A4. Bibliography
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
The Cucumber Book, Second Edition
Next
Next Chapter
7. Step Definitions: On the Inside
Part 2
A Worked Example
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset