SlideShare a Scribd company logo
GATEWAY TO AGILE
Taste of XP – BDD Event
THANK YOU
ROB, LARRY, PANEL
 Rob Trivetti, MATRIX, Sr Agile Coach, Empower Agile. He has experience
managing complex, high priority, cross-functional and time-sensitive
programs for Agile transformations, social media, eCommerce, SAAS and
telecom companies. Agile leader at AT&T, Intuit, LinkedIn, Walmart, to name
a few. Rob is a West Point graduate and served as the US Army Captain in
the Signal Corps.
 Larry Apke is the Agile Program Manager at Oracle. Larry has fulfilled roles:
Agile Leader, Program Manager, Senior Business Analyst, Business
Analyst, and Technical Writer at many organizations. Proven Leader in Agile
Development – Certified Scrum Master (CSM) - Certified Scrum Practitioner
(CSP) - Certified SAFe Agilist (SA). The author of Understanding The Agile
Manifesto: A Brief & Bold Guide to Agile. A recognized leader in the Agile
community and expert speaker, giving presentations to many different
groups such as the Scrum Users Group, Java Users Group, Desert Code
Camp and others. Founder of the Agile Coffee Group in San Antonio.
ROADMAP
EXTREME
PROGRAMMING (XP)
AND BDD
Agile Ecosystem Thread #3
XP/BDD
Panel
Next
Event
OUR
AGENDA
AGILE ECOSYSTEM
XP and BDD
practice
thread
Building in Quality: Behavior Driven
Development (BDD)
BDD Begins with Test Driven Development (TDD)
Why Do TDD?
• Maintainability
• Flexibility
• Extensibility
• High Rate of Test Code Coverage
• Streamlined Codebase
• Cleaner Interfaces
• Easier Refactoring of Code
• Tests Provide Some Code Documentation
• Bottom Line - Higher Quality
TDD Quotes from “Uncle Bob”
“It is a myth that we can get systems “right the first time.” Instead, we should implement
only today’s stories, then refactor and expand the system to implement new stories
tomorrow. This is the essence of iterative and incremental agility. Test-driven development,
refactoring, and the clean code they produce make this work at the code level.”
Robert “Uncle Bob” Martin is a software development professional
since 1970, co-author of the original Agile Manifesto, author of
numerous books on code quality including Clean code: a handbook
of agile software craftsmanship and The clean coder: a code of
conduct for professional programmers.
TDD Quotes from “Uncle Bob”
“The Three Laws of TDD:
1) You may not write production code until you have written a failing unit test.
2) You may not write more of a unit test than is sufficient to fail, and not compiling
is failing.
3) You may not write more production code than is sufficient to pass the currently
failing test.”
“Indeed, the ratio of time spent reading versus writing is well over 10 to
1. We are constantly reading old code as part of the effort to write new
code. ...[Therefore,] making it easy to read makes it easier to write.”
“So if you want to go fast, if you want to get done quickly, if you want
your code to be easy to write, make it easy to read.”
TDD Quotes from “Uncle Bob”
“A system that is comprehensively tested and passes all of its tests all of the time is a
testable system. That’s an obvious statement, but an important one. Systems that aren’t
testable aren’t verifiable. Arguably, a system that cannot be verified should never be
deployed.”
“If the discipline of requirements specification has taught us anything, it is that well-
specified requirements are as formal as code and can act as executable tests of that code!”
TDD Quotes from “Uncle Bob”
“Perhaps you thought that “getting it working” was the first order of business for a
professional developer. I hope by now, however, that this book has disabused you of that
idea. The functionality that you create today has a good chance of changing in the next
release, but the readability of your code will have a profound effect on all the changes that
will ever be made.”
“Programmers who satisfy themselves with merely working code are behaving
unprofessionally. “
“Writing clean code is what you must do in order to call yourself a professional. There is no
reasonable excuse for doing anything less than your best.”
TDD Quotes from “Uncle Bob”
In addition to Test Driven Development and writing testable, readable code, there are a
number of other things that go into making one a professional programmer.
• Your code must be secure
• Your code must be performant
• Your code must be deployable
• Your code must integrate (preferably using Continuous Integration)
In other words, code quality must be injected into the code by the professional
programmer. Quality cannot be inspected into the code ex post facto (after the fact)
The Professional Programmer
Why Doesn’t Everyone Do TDD?
• Most developers have not learned TDD
• There is a learning curve associated with learning TDD
• TDD is extremely disciplined
• There is a perception that development is slower
• It is difficult to introduce with legacy code
• Developers often need to mock objects and learn mocking
“I kept coming across the same confusion and misunderstandings. Programmers wanted to
know where to start, what to test and what not to test, how much to test in one go, what to
call their tests, and how to understand why a test fails.” - Dan North - Introduction to BDD
Along Comes BDD
• Behavior Driven Development
• Originally invented by Dan North to address the issues that developers where having
with TDD
• “My response is behaviour-driven development (BDD). It has evolved out of established
agile practices and is designed to make them more accessible and effective for teams
new to agile software delivery. Over time, BDD has grown to encompass the wider
picture of agile analysis and automated acceptance testing.”
• Created a “ubiquitous language for the analysis process itself!”
• Over time they found that the conversations between business and development where
richer
Why Do BDD?
• TDD build it right, BDD builds the right thing
• While there is no silver bullet to software development, BDD (when coupled with
continuous integration) comes as close as anything I have found
• My blog - “10 Reasons Why BDD Changes Everything” was published on 3/6/2012 and
still is the most visited page on my website
10 Reasons Why BDD Changes
Everything
• Communication between business and development is extremely focused as a result of
common language.
• Business needs tie directly to the code that is written.
• Developers know what test cases they should write to accommodate TDD.
• All the underlying benefits of TDD become more easily realized.
• Code is easier to maintain.
• Code is self documenting.
• Stories are easier to “groom” – breakdown, task and plan.
• Teams can be more agile.
• Developers can be trained / on-boarded easier.
• There is more visibility into team progress and status.
Step One
Write our story acceptance criteria using BDD scenarios
Step Two
Leverage these BDD scenarios to write our automated tests first in true TDD fashion
Step Three
Leverage a BDD Tool like Cucumber to map human-readable BDD scenarios to the
automated tests
Adopting BDD in Three Simple Steps
Step One is accomplished by the three amigos - Product Owner, Developer(s) and Quality
Assurance Person(s).
Step One is accomplished during Story Refinement which is where we go into detail for the
stories that we believe we will take during the next iteration.
This is the first step in transitioning to BDD and the one that brings the most benefit. It was
a pleasant surprise to Dan North and crew, something that they did not plan. Better
communication equals better quality.
Step One - Write Stories With BDD
Acceptance Criteria
Step One - Write Stories With BDD
Acceptance Criteria
The Story
Customer withdraws cash
As a customer,
I want to withdraw cash from an ATM,
so that I don’t have to wait in line at the bank.
The Story
Customer withdraws cash
As a customer,
I want to withdraw cash from an ATM,
so that I don’t have to wait in line at the bank.
Scenario 1 - Account is In Credit
Given the account is in credit
And the card is valid
And the dispenser contains cash
When the customer requests cash
Then ensure the account is debited
And ensure cash is dispensed
And ensure the card is returned
Step One - Write Stories With BDD
Acceptance Criteria
The Story
Customer withdraws cash
As a customer,
I want to withdraw cash from an ATM,
so that I don’t have to wait in line at the bank.
Scenario 2 - Account is overdrawn past the overdraft limit
Given the account is overdrawn
And the card is valid
When the customer requests cash
Then ensure a rejection message is displayed
And ensure cash is not dispensed
And ensure the card is returned
Step One - Write Stories With BDD
Acceptance Criteria
In step two we leverage BDD to write our tests and begin the process of TDD. BDD
scenarios can be written directly into tests using comments.
Step Two - Put Your BDD A.C. into
Tests
public class AccountIsInCredit extends TestCase {
@Setup
//Scenario 1 - Account is In Credit
// Given the account is in credit
// And the card is valid
// And the dispenser contains cash
Write code here to mock out account and add credit, mock out card and set as valid, etc.
//When the customer requests cash
Call CustomerRequestsCash class (or merthod) and pass values return computed values
@Test
//Then ensure the account is debited
// And ensure cash is dispensed
// And ensure the card is returned
Assert.AssertEquals(ExpectedAccountBalance, Account.Balance);
Assert.AssertEquals(CashDispensed, True);
Assert.AssertEquals(CardReturned, True);
}
Step Two - Put Your BDD A.C. into
Tests
• BDD Tool will take human-readable scenarios and use regular expressions to map the
human readable scenarios to Unit Tests.
• BDD Tools will create a unit test and shell automatically (referred to as a step definition
file) that helps in the creation of test.
• When the BDD Tool runs the tests, the output shows which tests passed and failed
against the human-readable scenarios.
• There are BDD Tools for all major languages
Step Three - Use BDD Tool
Scenario: Cutting vegetables
Given a cucumber that is 30 cm long
When I cut it in halves
Then I have two cucumbers
And both are 15 cm long
Given(/^a cucumber that is (d+) cm long$/) do |arg1|
pending # express the regexp above with the code you wish you had
end
When(/^I cut it in halves$/) do
pending # express the regexp above with the code you wish you had
end
Then(/^I have two cucumbers$/) do
pending # express the regexp above with the code you wish you had
end
Then(/^both are (d+) cm long$/) do |arg1|
pending # express the regexp above with the code you wish you had
end
Step Three - Use BDD Tool
Given /^a cucumber that is (d+) cm long$/ do |length|
@cucumber = {:color => 'green', :length => length.to_i}
end
When /^I (?:cut|chop) (?:it|the cucumber) in (?:halves|half|two)$/ do
@choppedCucumbers = [
{:color => @cucumber[:color], :length => @cucumber[:length] / 2},
{:color => @cucumber[:color], :length => @cucumber[:length] / 2}
]
end
Then /^I have two cucumbers$/ do
@choppedCucumbers.length.should == 2
end
Then /^both are (d+) cm long$/ do |length|
@choppedCucumbers.each do |cuke|
cuke[:length].should == length.to_i
end
end
Step Three - Use BDD Tool
#encoding: utf-8
Feature: Showcase the simplest possible cucumber scenario
In order to verify that cucumber is installed and configured correctly
As an aspiring BDD fanatic
I should be able to run this scenario and see that the steps pass (green like a cuke)
Scenario: Cutting vegetables # features/first.feature:8
Given a cucumber that is 30 cm long # features/step_definitions/first_steps.rb:3
When I cut it in halves # features/step_definitions/first_steps.rb:7
Then I have two cucumbers # features/step_definitions/first_steps.rb:14
And both are 15 cm long # features/step_definitions/first_steps.rb:18
1 scenario (1 passed)
4 steps (4 passed)
0m0.005s
Step Three - Use BDD Tool
Step Three - Use BDD Tool
Bonus Step - Use Tool Like Serenity to
Visualize Test Suite
BDD Gone Wrong
In the Cucumber Book, the authors describe four things that can go wrong with Cucumber
scenarios:
• Flickering Scenarios - Tests are failing randomly
• Brittle Scenarios – Tests keep breaking unintentionally
• Slow Features – Tests are taking too long to run
• Bored Stakeholders – Stakeholders do not read our features
The Cucumber Book outlines potential problems and solutions.
BDD and TDD is a commitment. Tests are code and must be treated as such. They will
need to be maintained the same as the rest of the code.
Helpful Links
• Dan North - Introduction to BDD
• The Cucumber Book: Behaviour-Driven Development for Testers and Developers
• BDD in Action: Behavior-driven development for the whole software lifecycle
• Specification by Example: How Successful Teams Deliver the Right Software
• Cucumber Tool
• Serenity Tool
• Clean Code: A Handbook of Agile Software Craftsmanship
Questions?
PANEL
Ask me About XP and BDD
GATEWAY TO AGILE
XP and BDD Next
AGILE ECOSYSTEM
Dark Agile is created by
improper alignment and
care of your Agile
Ecosystem AND
Unhappiness
DARK AGILE
PATTERNS
Technocentrics
Self-Absorbed
Augmented Reality
Laissez-Faire Grand Unified Theory
TECHNOCENTRICS
Too much Focus on Agile
Practices and Tools
Individual Collective
(Limited) Interior
SELF-ABSORBED
Too much Focus on Agile
Practices and Tools +
Agile Humanity
All Individual Interior
AUGMENTED REALITY
Little or No Focus on
Organization and Culture
& Environment
Individual Collective
(Selective) Interior
LAISSEZ-FAIRE
Insufficient Focus or
Alignment Across
Quadrants
Individual + Collective
Interior + Exterior
Minimalist
GRAND UNIFIED THEORY
Too Much Focus on Each
Quadrants, No
Synchronicity
Individual + Collective
Interior + Exterior
Extermist
GATEWAY TO AGILE
Roadmap and Interests Groups
ROADMAP
GRAND CHALLENGE
Team to organize and operate
grand challenge
Prize $TBD
EVENT COORDINATION
Team to help with
Meetup and Events
SPONSOR MANAGEMENT
Team to help with
Sponsors
THANK YOU
NEXT: Design Thinking (MVP)
And Design Sprints

More Related Content

What's hot

BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
John Ferguson Smart Limited
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
SmartBear
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and Serenity
John Ferguson Smart Limited
 
Big Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresBig Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance Nightmares
Gonzalo Rodríguez
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
Elad Maimon
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
Skills Matter
 
Developers Nepal Meetup #4 Report
Developers Nepal Meetup #4 ReportDevelopers Nepal Meetup #4 Report
Developers Nepal Meetup #4 Report
Punit Jajodia
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
John Ferguson Smart Limited
 
Evolution of Software Engineering in NCTR Projects
Evolution of Software Engineering in NCTR  Projects   Evolution of Software Engineering in NCTR  Projects
Evolution of Software Engineering in NCTR Projects
Mohammed Abbas
 
Code quality
Code qualityCode quality
Code quality
Provectus
 
How to successfully execute fixed price agile projects
How to successfully execute fixed price agile projectsHow to successfully execute fixed price agile projects
How to successfully execute fixed price agile projects
Katy Slemon
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
Garth Gilmour
 
Refactoring legacy code driven by tests - ITA
Refactoring legacy code driven by tests -  ITARefactoring legacy code driven by tests -  ITA
Refactoring legacy code driven by tests - ITA
Luca Minudel
 
The Technical Debt Trap - Michael "Doc" Norton
The Technical Debt Trap - Michael "Doc" NortonThe Technical Debt Trap - Michael "Doc" Norton
The Technical Debt Trap - Michael "Doc" Norton
LeanDog
 
Technical Debt and Requirements
Technical Debt and RequirementsTechnical Debt and Requirements
Technical Debt and Requirements
Neil Ernst
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
Marcello Duarte
 
Agile Testing
Agile Testing  Agile Testing
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Katy Slemon
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptMark Daggett
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
Helder De Oliveira
 

What's hot (20)

BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and Serenity
 
Big Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresBig Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance Nightmares
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
Developers Nepal Meetup #4 Report
Developers Nepal Meetup #4 ReportDevelopers Nepal Meetup #4 Report
Developers Nepal Meetup #4 Report
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
 
Evolution of Software Engineering in NCTR Projects
Evolution of Software Engineering in NCTR  Projects   Evolution of Software Engineering in NCTR  Projects
Evolution of Software Engineering in NCTR Projects
 
Code quality
Code qualityCode quality
Code quality
 
How to successfully execute fixed price agile projects
How to successfully execute fixed price agile projectsHow to successfully execute fixed price agile projects
How to successfully execute fixed price agile projects
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
 
Refactoring legacy code driven by tests - ITA
Refactoring legacy code driven by tests -  ITARefactoring legacy code driven by tests -  ITA
Refactoring legacy code driven by tests - ITA
 
The Technical Debt Trap - Michael "Doc" Norton
The Technical Debt Trap - Michael "Doc" NortonThe Technical Debt Trap - Michael "Doc" Norton
The Technical Debt Trap - Michael "Doc" Norton
 
Technical Debt and Requirements
Technical Debt and RequirementsTechnical Debt and Requirements
Technical Debt and Requirements
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Agile Testing
Agile Testing  Agile Testing
Agile Testing
 
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScript
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 

Similar to Gateway to Agile: XP and BDD

BDD presentation
BDD presentationBDD presentation
BDD presentation
temebele
 
DevOpsDays Jakarta Igites
DevOpsDays Jakarta IgitesDevOpsDays Jakarta Igites
DevOpsDays Jakarta Igites
DevOpsDaysJKT
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
Eduardo Riol
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
atSistemas
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
Sana Nasar
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven Development
Pankaj Nakhat
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
Luis García Castro
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
Intro to TDD & BDD
Intro to TDD & BDDIntro to TDD & BDD
Intro to TDD & BDD
devObjective
 
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous IntegrationITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
Ortus Solutions, Corp
 
2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd
ColdFusionConference
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Adam Englander
 
BDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous DeliveryBDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous Delivery
Kostas Mamalis (CSM CSPO)
 
Making the Move to Behavior Driven Development
Making the Move to Behavior Driven DevelopmentMaking the Move to Behavior Driven Development
Making the Move to Behavior Driven Development
QASymphony
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
Iosif Itkin
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
QASymphony
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Sakares Saengkaew
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
mtoppa
 
Open Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration PresentationOpen Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration Presentation
darryl_lehmann
 
Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven Development
Rasa Technologies
 

Similar to Gateway to Agile: XP and BDD (20)

BDD presentation
BDD presentationBDD presentation
BDD presentation
 
DevOpsDays Jakarta Igites
DevOpsDays Jakarta IgitesDevOpsDays Jakarta Igites
DevOpsDays Jakarta Igites
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven Development
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Intro to TDD & BDD
Intro to TDD & BDDIntro to TDD & BDD
Intro to TDD & BDD
 
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous IntegrationITB2015 - Behavior Driven Development, Automation and Continuous Integration
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
 
2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
BDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous DeliveryBDD - Collaboration for Continuous Delivery
BDD - Collaboration for Continuous Delivery
 
Making the Move to Behavior Driven Development
Making the Move to Behavior Driven DevelopmentMaking the Move to Behavior Driven Development
Making the Move to Behavior Driven Development
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
Open Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration PresentationOpen Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration Presentation
 
Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven Development
 

More from Gervais Johnson, Advisor

Dark Agile Avoidance
Dark Agile AvoidanceDark Agile Avoidance
Dark Agile Avoidance
Gervais Johnson, Advisor
 
Organize for Agile Adoption and Sustainability
Organize for Agile Adoption and SustainabilityOrganize for Agile Adoption and Sustainability
Organize for Agile Adoption and Sustainability
Gervais Johnson, Advisor
 
MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019
Gervais Johnson, Advisor
 
Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change
Gervais Johnson, Advisor
 
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gervais Johnson, Advisor
 
Jurgen Appleo - Shakeup & speedup 20 agile frameworks
Jurgen Appleo - Shakeup & speedup 20   agile frameworksJurgen Appleo - Shakeup & speedup 20   agile frameworks
Jurgen Appleo - Shakeup & speedup 20 agile frameworks
Gervais Johnson, Advisor
 
Agile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for AgileAgile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for Agile
Gervais Johnson, Advisor
 
TestOps and Shift Left
TestOps and Shift LeftTestOps and Shift Left
TestOps and Shift Left
Gervais Johnson, Advisor
 
Agile Business Value
Agile Business ValueAgile Business Value
Agile Business Value
Gervais Johnson, Advisor
 
Agile EcoSystem
Agile EcoSystemAgile EcoSystem
Agile EcoSystem
Gervais Johnson, Advisor
 
Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements
Gervais Johnson, Advisor
 
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design SprintsGateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
Gervais Johnson, Advisor
 
Gateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum EventGateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum Event
Gervais Johnson, Advisor
 
Gateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing TeamsGateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing Teams
Gervais Johnson, Advisor
 
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing TeamsGateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gervais Johnson, Advisor
 
Digital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOpsDigital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOps
Gervais Johnson, Advisor
 

More from Gervais Johnson, Advisor (16)

Dark Agile Avoidance
Dark Agile AvoidanceDark Agile Avoidance
Dark Agile Avoidance
 
Organize for Agile Adoption and Sustainability
Organize for Agile Adoption and SustainabilityOrganize for Agile Adoption and Sustainability
Organize for Agile Adoption and Sustainability
 
MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019MATRIX Business Agility Seminar June 2019
MATRIX Business Agility Seminar June 2019
 
Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change Agile Enterprise: How Business and Customers Drive Change
Agile Enterprise: How Business and Customers Drive Change
 
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019Gateway to Agile - Frameworks at TCS/Jile May 8 2019
Gateway to Agile - Frameworks at TCS/Jile May 8 2019
 
Jurgen Appleo - Shakeup & speedup 20 agile frameworks
Jurgen Appleo - Shakeup & speedup 20   agile frameworksJurgen Appleo - Shakeup & speedup 20   agile frameworks
Jurgen Appleo - Shakeup & speedup 20 agile frameworks
 
Agile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for AgileAgile Organization Design: How to Optimize Your Organization for Agile
Agile Organization Design: How to Optimize Your Organization for Agile
 
TestOps and Shift Left
TestOps and Shift LeftTestOps and Shift Left
TestOps and Shift Left
 
Agile Business Value
Agile Business ValueAgile Business Value
Agile Business Value
 
Agile EcoSystem
Agile EcoSystemAgile EcoSystem
Agile EcoSystem
 
Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements Gateway to Agile: Agile Requirements
Gateway to Agile: Agile Requirements
 
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design SprintsGateway to Agile: Product Discovery - Lean UX and Design Sprints
Gateway to Agile: Product Discovery - Lean UX and Design Sprints
 
Gateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum EventGateway to Agile: Taste of Scrum Event
Gateway to Agile: Taste of Scrum Event
 
Gateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing TeamsGateway to Agile - Happiness and High Performing Teams
Gateway to Agile - Happiness and High Performing Teams
 
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing TeamsGateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
Gateway to Agile: Session 1 Dark Agile and Hyper-Performing Teams
 
Digital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOpsDigital Enterprise Success Depends on DevOps and TestOps
Digital Enterprise Success Depends on DevOps and TestOps
 

Recently uploaded

María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Orkestra
 

Recently uploaded (16)

María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 

Gateway to Agile: XP and BDD

  • 1. GATEWAY TO AGILE Taste of XP – BDD Event
  • 3. ROB, LARRY, PANEL  Rob Trivetti, MATRIX, Sr Agile Coach, Empower Agile. He has experience managing complex, high priority, cross-functional and time-sensitive programs for Agile transformations, social media, eCommerce, SAAS and telecom companies. Agile leader at AT&T, Intuit, LinkedIn, Walmart, to name a few. Rob is a West Point graduate and served as the US Army Captain in the Signal Corps.  Larry Apke is the Agile Program Manager at Oracle. Larry has fulfilled roles: Agile Leader, Program Manager, Senior Business Analyst, Business Analyst, and Technical Writer at many organizations. Proven Leader in Agile Development – Certified Scrum Master (CSM) - Certified Scrum Practitioner (CSP) - Certified SAFe Agilist (SA). The author of Understanding The Agile Manifesto: A Brief & Bold Guide to Agile. A recognized leader in the Agile community and expert speaker, giving presentations to many different groups such as the Scrum Users Group, Java Users Group, Desert Code Camp and others. Founder of the Agile Coffee Group in San Antonio.
  • 7. AGILE ECOSYSTEM XP and BDD practice thread
  • 8. Building in Quality: Behavior Driven Development (BDD)
  • 9. BDD Begins with Test Driven Development (TDD)
  • 10. Why Do TDD? • Maintainability • Flexibility • Extensibility • High Rate of Test Code Coverage • Streamlined Codebase • Cleaner Interfaces • Easier Refactoring of Code • Tests Provide Some Code Documentation • Bottom Line - Higher Quality
  • 11. TDD Quotes from “Uncle Bob” “It is a myth that we can get systems “right the first time.” Instead, we should implement only today’s stories, then refactor and expand the system to implement new stories tomorrow. This is the essence of iterative and incremental agility. Test-driven development, refactoring, and the clean code they produce make this work at the code level.” Robert “Uncle Bob” Martin is a software development professional since 1970, co-author of the original Agile Manifesto, author of numerous books on code quality including Clean code: a handbook of agile software craftsmanship and The clean coder: a code of conduct for professional programmers.
  • 12. TDD Quotes from “Uncle Bob” “The Three Laws of TDD: 1) You may not write production code until you have written a failing unit test. 2) You may not write more of a unit test than is sufficient to fail, and not compiling is failing. 3) You may not write more production code than is sufficient to pass the currently failing test.”
  • 13. “Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.” “So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.” TDD Quotes from “Uncle Bob”
  • 14. “A system that is comprehensively tested and passes all of its tests all of the time is a testable system. That’s an obvious statement, but an important one. Systems that aren’t testable aren’t verifiable. Arguably, a system that cannot be verified should never be deployed.” “If the discipline of requirements specification has taught us anything, it is that well- specified requirements are as formal as code and can act as executable tests of that code!” TDD Quotes from “Uncle Bob”
  • 15. “Perhaps you thought that “getting it working” was the first order of business for a professional developer. I hope by now, however, that this book has disabused you of that idea. The functionality that you create today has a good chance of changing in the next release, but the readability of your code will have a profound effect on all the changes that will ever be made.” “Programmers who satisfy themselves with merely working code are behaving unprofessionally. “ “Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.” TDD Quotes from “Uncle Bob”
  • 16. In addition to Test Driven Development and writing testable, readable code, there are a number of other things that go into making one a professional programmer. • Your code must be secure • Your code must be performant • Your code must be deployable • Your code must integrate (preferably using Continuous Integration) In other words, code quality must be injected into the code by the professional programmer. Quality cannot be inspected into the code ex post facto (after the fact) The Professional Programmer
  • 17. Why Doesn’t Everyone Do TDD? • Most developers have not learned TDD • There is a learning curve associated with learning TDD • TDD is extremely disciplined • There is a perception that development is slower • It is difficult to introduce with legacy code • Developers often need to mock objects and learn mocking “I kept coming across the same confusion and misunderstandings. Programmers wanted to know where to start, what to test and what not to test, how much to test in one go, what to call their tests, and how to understand why a test fails.” - Dan North - Introduction to BDD
  • 18. Along Comes BDD • Behavior Driven Development • Originally invented by Dan North to address the issues that developers where having with TDD • “My response is behaviour-driven development (BDD). It has evolved out of established agile practices and is designed to make them more accessible and effective for teams new to agile software delivery. Over time, BDD has grown to encompass the wider picture of agile analysis and automated acceptance testing.” • Created a “ubiquitous language for the analysis process itself!” • Over time they found that the conversations between business and development where richer
  • 19. Why Do BDD? • TDD build it right, BDD builds the right thing • While there is no silver bullet to software development, BDD (when coupled with continuous integration) comes as close as anything I have found • My blog - “10 Reasons Why BDD Changes Everything” was published on 3/6/2012 and still is the most visited page on my website
  • 20. 10 Reasons Why BDD Changes Everything • Communication between business and development is extremely focused as a result of common language. • Business needs tie directly to the code that is written. • Developers know what test cases they should write to accommodate TDD. • All the underlying benefits of TDD become more easily realized. • Code is easier to maintain. • Code is self documenting. • Stories are easier to “groom” – breakdown, task and plan. • Teams can be more agile. • Developers can be trained / on-boarded easier. • There is more visibility into team progress and status.
  • 21. Step One Write our story acceptance criteria using BDD scenarios Step Two Leverage these BDD scenarios to write our automated tests first in true TDD fashion Step Three Leverage a BDD Tool like Cucumber to map human-readable BDD scenarios to the automated tests Adopting BDD in Three Simple Steps
  • 22. Step One is accomplished by the three amigos - Product Owner, Developer(s) and Quality Assurance Person(s). Step One is accomplished during Story Refinement which is where we go into detail for the stories that we believe we will take during the next iteration. This is the first step in transitioning to BDD and the one that brings the most benefit. It was a pleasant surprise to Dan North and crew, something that they did not plan. Better communication equals better quality. Step One - Write Stories With BDD Acceptance Criteria
  • 23. Step One - Write Stories With BDD Acceptance Criteria The Story Customer withdraws cash As a customer, I want to withdraw cash from an ATM, so that I don’t have to wait in line at the bank.
  • 24. The Story Customer withdraws cash As a customer, I want to withdraw cash from an ATM, so that I don’t have to wait in line at the bank. Scenario 1 - Account is In Credit Given the account is in credit And the card is valid And the dispenser contains cash When the customer requests cash Then ensure the account is debited And ensure cash is dispensed And ensure the card is returned Step One - Write Stories With BDD Acceptance Criteria
  • 25. The Story Customer withdraws cash As a customer, I want to withdraw cash from an ATM, so that I don’t have to wait in line at the bank. Scenario 2 - Account is overdrawn past the overdraft limit Given the account is overdrawn And the card is valid When the customer requests cash Then ensure a rejection message is displayed And ensure cash is not dispensed And ensure the card is returned Step One - Write Stories With BDD Acceptance Criteria
  • 26. In step two we leverage BDD to write our tests and begin the process of TDD. BDD scenarios can be written directly into tests using comments. Step Two - Put Your BDD A.C. into Tests
  • 27. public class AccountIsInCredit extends TestCase { @Setup //Scenario 1 - Account is In Credit // Given the account is in credit // And the card is valid // And the dispenser contains cash Write code here to mock out account and add credit, mock out card and set as valid, etc. //When the customer requests cash Call CustomerRequestsCash class (or merthod) and pass values return computed values @Test //Then ensure the account is debited // And ensure cash is dispensed // And ensure the card is returned Assert.AssertEquals(ExpectedAccountBalance, Account.Balance); Assert.AssertEquals(CashDispensed, True); Assert.AssertEquals(CardReturned, True); } Step Two - Put Your BDD A.C. into Tests
  • 28. • BDD Tool will take human-readable scenarios and use regular expressions to map the human readable scenarios to Unit Tests. • BDD Tools will create a unit test and shell automatically (referred to as a step definition file) that helps in the creation of test. • When the BDD Tool runs the tests, the output shows which tests passed and failed against the human-readable scenarios. • There are BDD Tools for all major languages Step Three - Use BDD Tool
  • 29. Scenario: Cutting vegetables Given a cucumber that is 30 cm long When I cut it in halves Then I have two cucumbers And both are 15 cm long Given(/^a cucumber that is (d+) cm long$/) do |arg1| pending # express the regexp above with the code you wish you had end When(/^I cut it in halves$/) do pending # express the regexp above with the code you wish you had end Then(/^I have two cucumbers$/) do pending # express the regexp above with the code you wish you had end Then(/^both are (d+) cm long$/) do |arg1| pending # express the regexp above with the code you wish you had end Step Three - Use BDD Tool
  • 30. Given /^a cucumber that is (d+) cm long$/ do |length| @cucumber = {:color => 'green', :length => length.to_i} end When /^I (?:cut|chop) (?:it|the cucumber) in (?:halves|half|two)$/ do @choppedCucumbers = [ {:color => @cucumber[:color], :length => @cucumber[:length] / 2}, {:color => @cucumber[:color], :length => @cucumber[:length] / 2} ] end Then /^I have two cucumbers$/ do @choppedCucumbers.length.should == 2 end Then /^both are (d+) cm long$/ do |length| @choppedCucumbers.each do |cuke| cuke[:length].should == length.to_i end end Step Three - Use BDD Tool
  • 31. #encoding: utf-8 Feature: Showcase the simplest possible cucumber scenario In order to verify that cucumber is installed and configured correctly As an aspiring BDD fanatic I should be able to run this scenario and see that the steps pass (green like a cuke) Scenario: Cutting vegetables # features/first.feature:8 Given a cucumber that is 30 cm long # features/step_definitions/first_steps.rb:3 When I cut it in halves # features/step_definitions/first_steps.rb:7 Then I have two cucumbers # features/step_definitions/first_steps.rb:14 And both are 15 cm long # features/step_definitions/first_steps.rb:18 1 scenario (1 passed) 4 steps (4 passed) 0m0.005s Step Three - Use BDD Tool
  • 32. Step Three - Use BDD Tool
  • 33. Bonus Step - Use Tool Like Serenity to Visualize Test Suite
  • 34. BDD Gone Wrong In the Cucumber Book, the authors describe four things that can go wrong with Cucumber scenarios: • Flickering Scenarios - Tests are failing randomly • Brittle Scenarios – Tests keep breaking unintentionally • Slow Features – Tests are taking too long to run • Bored Stakeholders – Stakeholders do not read our features The Cucumber Book outlines potential problems and solutions. BDD and TDD is a commitment. Tests are code and must be treated as such. They will need to be maintained the same as the rest of the code.
  • 35. Helpful Links • Dan North - Introduction to BDD • The Cucumber Book: Behaviour-Driven Development for Testers and Developers • BDD in Action: Behavior-driven development for the whole software lifecycle • Specification by Example: How Successful Teams Deliver the Right Software • Cucumber Tool • Serenity Tool • Clean Code: A Handbook of Agile Software Craftsmanship
  • 37. PANEL Ask me About XP and BDD
  • 38. GATEWAY TO AGILE XP and BDD Next
  • 39. AGILE ECOSYSTEM Dark Agile is created by improper alignment and care of your Agile Ecosystem AND Unhappiness
  • 41. TECHNOCENTRICS Too much Focus on Agile Practices and Tools Individual Collective (Limited) Interior
  • 42. SELF-ABSORBED Too much Focus on Agile Practices and Tools + Agile Humanity All Individual Interior
  • 43. AUGMENTED REALITY Little or No Focus on Organization and Culture & Environment Individual Collective (Selective) Interior
  • 44. LAISSEZ-FAIRE Insufficient Focus or Alignment Across Quadrants Individual + Collective Interior + Exterior Minimalist
  • 45. GRAND UNIFIED THEORY Too Much Focus on Each Quadrants, No Synchronicity Individual + Collective Interior + Exterior Extermist
  • 46. GATEWAY TO AGILE Roadmap and Interests Groups
  • 48. GRAND CHALLENGE Team to organize and operate grand challenge Prize $TBD
  • 49. EVENT COORDINATION Team to help with Meetup and Events
  • 50. SPONSOR MANAGEMENT Team to help with Sponsors
  • 51. THANK YOU NEXT: Design Thinking (MVP) And Design Sprints

Editor's Notes

  1. 13 Key recommendations are grouped into 5 functional areas (themes)
  2. 13 Key recommendations are grouped into 5 functional areas (themes)
  3. 13 Key recommendations are grouped into 5 functional areas (themes)