You are previewing Instant Cucumber BDD How-to.
O'Reilly logo
Instant Cucumber BDD How-to

Book Description

A short and quick guide to mastering behavior-driven software development with Cucumber

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.

  • A step-by-step process of developing a real project in a BDD-style using Cucumber

  • Pro tips for writing Cucumber features and steps

  • Introduces some popular and useful third-party gems used with Cucumber

In Detail

Cucumber is a Behavior Driven Design framework, which allows a developer to write specification tests which then tests that the program works as it should. It is a different development paradigm, as it involves writing what the program should do first, then you develop until it passes the tests.

Instant Cucumber BDD How-to will cover basics of Cucumber in a Behaviour Driven Development (BDD) style and explain the essence of Cucumber, describe how to write Cucumber features to drive development in a real project, and also describe many pro tips for writing good Cucumber features and steps. Cucumber is a very fun and cool tool for writing automated acceptance tests to support software development in a Behaviour Driven Development (BDD) style.

Instant Cucumber BDD How-to will highlight Cucumber's central role in a development approach called Behaviour Driven Development (BDD), describe how to write Cucumber features to drive development in a real project, and finally introduce some famous third-party libraries used inline with Cucumber.

It will show you how to carry out all the tasks associated with BDD using Cucumber and write basic Cucumber steps. It will assist you in using Pro tips for writing expressive Gherkin and implement guidelines for writing DRY steps. You'll learn how to use Cucumber's Gherkin to describe the behavior customers want from the system in a plain language.

Table of Contents

  1. Instant Cucumber BDD How-to
    1. Instant Cucumber BDD How-to
    2. Credits
    3. About the Author
    4. About the Reviewers
    5. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    7. 1. Instant Cucumber BDD How-to
      1. Understanding behavior-driven development (Intermediate)
        1. Getting ready
        2. How to do it…
        3. There's more…
      2. Setting up an environment for Cucumber BDD on Rails (Intermediate)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Cucumber in other languages/platforms
          2. Cucumber in your mother language
      3. Writing your first Hello World feature (Simple)
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Learning foundation knowledge and skills (Intermediate)
        1. Getting ready
          1. Gherkin
          2. Cucumber step
        2. How to do it...
        3. How it works...
      5. Building a real web application with Cucumber (Intermediate)
        1. Getting ready
        2. How to do it...
          1. Story #1: As a blog owner, I can write new blog posts
          2. Story #2: As a blog visitor, I can see a list of posted blogs
          3. Story #3: As a blog owner, I can edit my blog posts
          4. Story #4: As a blog visitor, I can input comments onto the blog
          5. Story #5: As a blog owner, I can delete comments
        3. How it works...
      6. Mastering pro tips for writing expressive Gherkin (Intermediate)
        1. Getting ready
        2. How to do it...
          1. Define a background for scenarios
          2. Outline-related attributes in a table
          3. Using a scenario outline
          4. Doc strings
        3. There's more…
          1. Using tags
          2. Imperative steps versus declarative steps
      7. Mastering pro tips for writing good steps (Advanced)
        1. Getting ready
        2. How to do it...
          1. Flexible pluralization
          2. Non-capturing groups
          3. Step argument transforms (transform wisdom)
          4. Defining the methods and extending "World"
          5. Compound steps
          6. Unanchored steps
        3. There's more…
          1. Be organized
      8. Using third-party libraries with Cucumber (Intermediate)
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Factory_Girl
          2. Pickle
          3. WebMock
          4. Spork and Guard