Behavior-driven Development:
The Big Picture
Introduction to Behavior-driven
Development
Marko Vajs
Software Development Engineer in Test
Course What is Behavior-driven development
(BDD)?
Overview
What problems does BDD solve?
When to use BDD?
What are some popular tools and
frameworks for BDD?
Is BDD the right choice for you and your
team?
Understand BDD Know where to apply Continue your
concepts better BDD learning
Behavior-driven Development: The Big
Picture
Version Check
Version Check This course was created by using:
- Java 17
- Cucumber 7.14
- Behave Pro 2.3.5
And is 100% applicable to these versions.
What Is BDD?
Behavior-driven development
Behavior-driven development (BDD) is a software development
methodology that encourages collaboration among developers, test
engineers, and business representatives when working on a project.
Requirement Analysis
Requirement Analysis
Bugs Delays
Wrong Features
Relative Cost of Fixing Bugs
25x
20x
15x
10x
5x
0x
Requirements Coding Integration Testing User Acceptance Production
Testing
Relative Cost of Fixing Bugs
25x
20x
15x
10x
5x
0x
Requirements Coding Integration Testing User Acceptance Production
Testing
Software Product Business Requirements
Software Product Business Requirements
The Purpose of Creating Examples
Documenting requirements
Removing ambiguities
Gaining shared understanding
Identifying potential issues
Avoiding delays, reworks, and defects
The Behavior-driven Development Process
Scenarios Tests
Examples
Acceptance
Criteria
Refinement
TDD vs. BDD
Test-driven Development
Test-driven development (TDD) is a software development practice that
emphasizes writing tests before writing the actual code.
The Goal of Test-driven Development
Build features of higher quality Speed up the development
The Test-driven Development Cycle
Failing Passing
Test Test
Refactor
The Behavior-driven Development Cycle
Failing Passing
Scenario Scenario
Failing Passing
Test Test
Refactor
Refactor
Behavior and Test-driven Development
BDD TDD
Tests are written before the code Tests are written before the code
Tests can be included in the CI Tests can be included in the CI
Tests are written from the user’s Focused on testing smaller units in
perspective isolation
Tests are the product of Tests are written by a sole
collaboration between business, developer
developers, and test engineers
Tests are understood by technical Tests are only understood by
and non-technical people technical people
Benefits of Adopting BDD
Directly Measurable Benefits
Reduced time to complete tasks
A lower number of production issues
The delivery process costs less money
Indirectly Measurable Benefits
Higher confidence in the quality of the product
Increased individual productivity and motivation
Increased knowledge of the product domain
Behavior-driven
development is not a
silver bullet.