Site icon Red Green Refactor

Book Club: Behavior Driven Development – Discovery (Chapter 4)

Photo by Ricardo Esquivel on Pexels.com

This entry is in the series BDD Discovery

The following is a chapter summary for “BDD Books – Discovery” by Gaspar Nagy and Seb Rose for an online book club.

The book club is a weekly lunchtime meeting of technology professionals. As a group, the book club selects, reads, and discuss books related to our profession. Participants are uplifted via group discussion of foundational principles & novel innovations. Attendees do not need to read the book to participate.

Background on BDD Discovery

DISCOVERY

“Explore behavior using examples

Written by the creator of SpecFlow and the author of The Cucumber for Java Book, this book provides inside information on how to get the most out of the discovery phase of Behaviour Driven Development (BDD). This practical guide demonstrates good collaboration techniques, illustrated by concrete examples.

This book is written for everyone involved in the specification and delivery of software (including product owners, business analysts, developers, and testers). The book starts by explaining the reasons BDD exists in the first place and describes techniques for getting the most out of collaboration between business and delivery team members.

This is the first in the BDD Books series that will guide you through the entire development process, including specific technical practices needed to successfully drive development using collaboratively-authored specifications and living documentation.”

BDD Discovery

Chapter 4

The prior chapters emphasized the importance of collaboration for BDD to be successful. This chapter demonstrates how BDD can be integrated into the Software Development Lifecycle (SDLC) by describing the approach in more detail. The chapter will answer the following questions:

4.1 The BDD Approach

Figure 21 is a simplified approach of BDD. In practice, BDD is more complex and requires several connected activities to be successful.

For each step in the process, please refer to Figure 22.

#1 Pick a User Story

#2 Requirement Workshop

#3 Formulate

#4 Review

#5 Automate

#6 Implement

#7 Supplementary Test

#8 Release

4.2 BDD in Scrum

In Scrum, work is organized into sprints that are 2-4 week iterations. There are regular workshops that focus on the customer’s requirements throughout each Sprint (backlog refinement, backlog grooming sprint planning preparation, sprint planning) where user stories are prepared.

At the Sprint Planning meeting, the team chooses a few stories to implement in the upcoming sprint.

Once the Sprint is done, the team presents their results in a Sprint Review/Demo and potential process improvements are discussed in the Sprint Retrospective.

Requirement Workshops

In BDD, the team will explore and discover details of stories as part of refinement activities If the Product Owner is available, then they should organize short Example Mapping sessions regularly to replace backlog refinement meetings. Examples will help focus the work on outcomes.

Formulate

Establishing a shared understanding is important, but making the entire team discuss the best way to express a scenario in business language is not efficient.

The best time to formulate the details of scenarios is outside the requirement meetings. Formulation is usually undertaken by a pair, often a developer and a tester.

In some projects, the scenarios have to be formally approved by the product owner or someone else. In these cases, the formulation has to be prioritized and planned in a way that the team does not get blocked.

How scenarios help with the decomposition into tasks:

“In Scrum, stories are usually broken down into tasks. Tasks are work units that represent the design decisions of the team and they are also used to track the daily progress of the team.”

Chapter 4 – BDD in Scrum

Tasks are owned by the development team The tasks are often technical and do not have to be understandable by the Product Owner. However, examples and scenarios should describe the functional breakdown of the story (business readable).

Tasks are aligned to scenarios, which results in several benefits:

4.3 BDD in Lean/Kanban

Kanban optimizes end-to-end delivery (“lead time”) by visualizing the workflow and limiting work in progress (WIP) to be able to detect and fix bottlenecks more easily.

The activities of the BDD approach are realized in user stories, which are the typical work unit tracked on Kanban boards. Example Mapping sessions can be used to feed the input of the development pipeline whenever capacity allows.

For automation implementation, an additional column would be added to the Kanban board. The tasks formulate, automate, implement, review and supplementary test can be seen as a sub-workflow.

4.4 BDD in Distributed Teams

BDD in distributed teams is carried out in the same way as for co-located teams. Good audio-visual facilities and collaborative online tools are essential. Providing information about the scenario implementation status can lead to improved cooperation between developers, testers, and product owners.

Requirement Workshops with Distributed Teams

Modifications are necessary over the use of index cards in Example Mapping. •A remote requirement workshop will still maintain the same standards:

There is no online implementation of Example Mapping; however, Google Sheets can be used as an active workspace during the remote requirement workshop.

4.5 BDD in Fixed Scope Projects

“Projects with fixed price, fixed scope, fixed “everything” are definitely not ideal for agile software development, especially when we’re building highly complex, sophisticated and usable applications in a rapidly changing business environment.”

Chapter 4 – BDD in Fixed Scope Projects

Typical fixed scope projects are provided with a detailed specification document that is supposed to describe all the necessary details to provide a cost estimate.

A large portion of work is about understanding the domain, trying to provide solutions for the requirements that satisfy the customer, stay within the scope of the original, contracted specification document, and stay within budget. BDD can help to provide a frame for domain discovery and for documenting the detailed requirement decisions the team makes.

Use Example Mapping to prepare the individual features for development. When a feature is ready for development, the specification document should be used to build an Example Map with all the rules and illustrative examples. The static specification document can be transformed into a continuously validated living document.

4.6 BDD in Regulated Environments

Regulated Environments focus on the following areas:

BDD applies to a regulated environment in the following ways:

Running automated scenarios in this environment will document the expected behavior, describe the tests that verify the behavior, and provide evidence of execution.

4.7 What We Just Learned

BDD is a set of practices that, when combined, can improve the quality of a team’s development process.

BDD integrates with various common development methodologies and team configurations.

With appropriate technology support, BDD can work well for distributed teams, acting as an aid to collaboration.

Series Navigation
Exit mobile version