SlideShare una empresa de Scribd logo
1 de 32
BEHAVIOR DRIVEN
DEVELOPMENT
Ritesh Mehrotra
©TechTalks, 2018
References
• “BDD in action” by John Ferguson Smart
• “Specification by example” by Gojko Adzic
©TechTalks, 2018
Agenda
• What is BDD?
• How it differs from complementsTDD?
• Real examples onTDD/BDD
• Dive deeper into BDD
• Q & A
©TechTalks, 2018
The beginning
• Approach to collaboratively develop
software that delivers value and is
transparent
• Coined and developed by Dan north
• Meant to address limitations with
TDD
• Popular frameworks: Cucumber,
Specflow, Jasmine(BDD like),
Jbehave
• Expressed in Gherkin language
©TechTalks, 2018
Gherkin language
Feature: Knowledge sharing session
Narrative: As a speaker, I want to record my talk, so that I can replay it later for
audience who could not attend
Scenario: Recording a session
Given: I am a speaker in a session
And: I have placed a camera in the room
When: I start the recording
Then:The session should get recorded
©TechTalks, 2018
What isTDD?
• “Set of techniques that encourages
simple design and test suites that
inspire confidence” – Kent Beck
• Write a failing automated test before
code
• Remove duplication
©TechTalks, 2018
Write code
to pass the
test
Refactor code
without letting the
test fail
A failing
test without
code
WhyTDD?
• Improves the software design
• Enhances developer ability to write readable and easier-to-maintain code
• Helps set the boundaries of expected work - example
• Subsequently lesser defects
©TechTalks, 2018
So where is the problem?
©TechTalks, 2018
Persona #1
• Name: Max
• Age: 35
• Occupation: Software Professional
• BIO
Software developer and consultant. Has a family of 4
He has just moved to Singapore on employment visa with a multi-national
company. On induction, his employer, familiarized Max with the surroundings,
work culture and terms of employment contract.
Max is staying in a company sponsored hotel, and will need to rent a place within
a week’s time. He didn’t anticipate the expenses, and is carrying little cash. He
hopes he will be able to cover expenses with first salary due soon
The company pays all their employees at last day of the month through bank
transfers. He has joined in 3rd week of month, and needs a account soon to
receive his salary in time.
©TechTalks, 2018
Persona #2
• Name: Rob
• Age 50
• Occupation: Trader and Investor
• Bio
Rob is anTrader and investor with business interest in Asia-pacific region.
Primarily based in Singapore, he travels across China, Indonesia, Cambodia
and India very frequently for business.
He often employs vendors for his business and pays them through cheque
post work. Due to his busy schedule and frequent travels, the payments are
sometimes late and annoys the business partners.
To secure his and partners business interests, he needs a easier way of making
payments
©TechTalks, 2018
Features
In order to receive payments for my work,
As a prospective banking customer,
I want to open a savings bank account
©TechTalks, 2018
In order to make payments to contractors,
As a bank customer,
I want to initialize a funds transfer from my savings
account
Who?
What?
Why?
Story #1
©TechTalks, 2018
Title: Open a savings account
In order to receive payments for my work,
As a prospective banking customer,
I want to open a savings account
Acceptance criteria
©TechTalks, 2018
Inputs:
- Full name
- Unique identifier (NRIC, FIN, Passport)
- Address
- Email address
- Phone number
- Agreement onT&C
- AccountType: Savings
Output:
- Account number: 6 digit unique account number
- Account type: Savings
- Deposit funds
- Withdraw funds
- Statements
- Debit card
Story #2
©TechTalks, 2018
Title: Transfer funds from one account to another
In order to make payment to contractor,
As a bank customer,
I want to initialize a funds transfer from my savings account
Acceptance criteria
©TechTalks, 2018
Inputs:
- From account: 6 digit account number
- To account: 6 digit account number
- Amount: Decimal value greater than ZERO(0). Referred hereafter as $
Output:
- Transaction id: Numeric id
- From account debited of $(decimal value)
- To account credited of $(decimal value)
Let’s code
©TechTalks, 2018
The limitation withTDD
• What all to test? How much to test? What should we name it?
• How to validate that tests cover the acceptance criteria?
• Maintenance and readability a challenge as product grows in size
• Does it the right way. But does it do the right thing?
©TechTalks, 2018
BDD deep dive
©TechTalks, 2018
What is BDD again?
• BDD =TDD + Enhanced business collaboration
• Aligned to the business value
• A single source of truth – equally understood by business and development teams
©TechTalks, 2018
Whose behavior?
• Business
• Consumer
• Customers/Beneficiaries
• Staff
• Govt.Agencies/Regulatory/Audit
©TechTalks, 2018
What is value?
• Increase profit - Eg. New features
• Protect profit – Eg. Customer
satisfaction
• Reduce cost – Eg. Support
• Avoid future cost – Eg. Regulatory
©TechTalks, 2018
Where is value?
©TechTalks, 2018
IDENTIFYTHEVALUE
©TechTalks, 2018
(Why?) * 5
©TechTalks, 2018
RCA example
• The system is currently down
• Why?
• The underlying authentication service is failing so we cannot log in
• Why?
• The authentication service cannot connect to repository
• Why?
• The connection parameters are incorrect
• Why?
• There was a change in database host name which was not updated in authentication
service
©TechTalks, 2018
Applied to goal discovery
• We want to offer $ 25 cashback for customers who do less than 10 withdrawals a month?
• Why do you offer that?
• A promotion will encourage more customers to do lesser withdrawals
• Why do you want to encourage them?
• By means of that, we want to promote cashless transactions
• Why so?
• Because we want to reduce usage of ATM
• Why?
• Maintaining the ATMs is an additional cost, and our analysis suggests that we will be able
to save cost by 5% by reducing usage
©TechTalks, 2018
Impact mapping
©TechTalks, 2018
Why? Who? How? What?
Business Goal Stakeholders Capabilities Features
Save the cost by 5%
Enable cashless
transactions
Offer cashback on less
than 10 withdrawals
Pay online
Pay by card
Pay by cheque
Capture number of
transactions
Approach
©TechTalks, 2018
Seek example
• “Can you give me an example?”
• Precise specifications so delivery teams avoid rework caused by ambiguity
• Objective way to measure when work is complete
• Documentation to facilitate change, both in terms of features and team structure
• Described in book “Specification by Example” by Gojko Adzie
©TechTalks, 2018
Let’s revisit code
©TechTalks, 2018
BDD in a nutshell
©TechTalks, 2018
ThankYou!!
©TechTalks, 2018

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Trajectory Startup Program Session 2 (Cairo July 2021)
Trajectory Startup Program Session 2  (Cairo July 2021)Trajectory Startup Program Session 2  (Cairo July 2021)
Trajectory Startup Program Session 2 (Cairo July 2021)
 
Nick Garner - LAC 2017 - The great 'brand phrase' goldmine
Nick Garner - LAC 2017 - The great 'brand phrase' goldmineNick Garner - LAC 2017 - The great 'brand phrase' goldmine
Nick Garner - LAC 2017 - The great 'brand phrase' goldmine
 
InvestNOLA Applying a Crisis Framework - Fall Training Series
InvestNOLA Applying a Crisis Framework - Fall Training Series InvestNOLA Applying a Crisis Framework - Fall Training Series
InvestNOLA Applying a Crisis Framework - Fall Training Series
 
Icorps University of Washington Program 07.06.2021
Icorps University of Washington Program 07.06.2021Icorps University of Washington Program 07.06.2021
Icorps University of Washington Program 07.06.2021
 
Trajectory Startup Program Session 2 - Bahrain Cycle 7
Trajectory Startup Program Session 2 - Bahrain Cycle 7Trajectory Startup Program Session 2 - Bahrain Cycle 7
Trajectory Startup Program Session 2 - Bahrain Cycle 7
 
Hardbacon Pitch Deck
Hardbacon Pitch DeckHardbacon Pitch Deck
Hardbacon Pitch Deck
 
Trajectory Series Startup Program Session 1 (Cairo Cycle 16)
Trajectory Series Startup Program Session 1 (Cairo Cycle 16)Trajectory Series Startup Program Session 1 (Cairo Cycle 16)
Trajectory Series Startup Program Session 1 (Cairo Cycle 16)
 
Trajectory Startup Program Session 1 - Bahrain Cycle 7
Trajectory Startup Program Session 1 - Bahrain Cycle 7Trajectory Startup Program Session 1 - Bahrain Cycle 7
Trajectory Startup Program Session 1 - Bahrain Cycle 7
 
Startup Revenue Drivers and Forecasting
Startup Revenue Drivers and ForecastingStartup Revenue Drivers and Forecasting
Startup Revenue Drivers and Forecasting
 
Alliance of Angels - Startup Models and Methods - Dave Parker 09.2020
Alliance of Angels - Startup Models and Methods - Dave Parker 09.2020Alliance of Angels - Startup Models and Methods - Dave Parker 09.2020
Alliance of Angels - Startup Models and Methods - Dave Parker 09.2020
 
Flat6 Labs Bahrain Bootcamp Day 1
Flat6 Labs Bahrain Bootcamp Day 1 Flat6 Labs Bahrain Bootcamp Day 1
Flat6 Labs Bahrain Bootcamp Day 1
 
Trajectory Startup Program Abu Dhabi Day 2
Trajectory Startup Program Abu Dhabi Day 2Trajectory Startup Program Abu Dhabi Day 2
Trajectory Startup Program Abu Dhabi Day 2
 
Shaking Foundations: How to Move From a Corporate to an Open API Mindset
Shaking Foundations: How to Move From a Corporate to an Open API MindsetShaking Foundations: How to Move From a Corporate to an Open API Mindset
Shaking Foundations: How to Move From a Corporate to an Open API Mindset
 
Techstars Seattle — Startup Revenue Models and Forecasting
Techstars Seattle — Startup Revenue Models and ForecastingTechstars Seattle — Startup Revenue Models and Forecasting
Techstars Seattle — Startup Revenue Models and Forecasting
 
Driving Startup Valuations for Funding & Exit
Driving Startup Valuations for Funding & Exit Driving Startup Valuations for Funding & Exit
Driving Startup Valuations for Funding & Exit
 
Flat6 Labs Bahrain Cycle 6 Bootcamp Day 3
Flat6 Labs Bahrain Cycle 6 Bootcamp Day 3Flat6 Labs Bahrain Cycle 6 Bootcamp Day 3
Flat6 Labs Bahrain Cycle 6 Bootcamp Day 3
 
Trajectory Startup Program Session 3 - Bahrain Cycle 7
Trajectory Startup Program Session 3 - Bahrain Cycle 7Trajectory Startup Program Session 3 - Bahrain Cycle 7
Trajectory Startup Program Session 3 - Bahrain Cycle 7
 
Startup Revenue Models, Pricing and Enterprise Value
Startup Revenue Models, Pricing and Enterprise ValueStartup Revenue Models, Pricing and Enterprise Value
Startup Revenue Models, Pricing and Enterprise Value
 
Trajectory Startup Program Session 2 (Cairo cycle 16)
Trajectory Startup Program Session 2 (Cairo cycle 16)Trajectory Startup Program Session 2 (Cairo cycle 16)
Trajectory Startup Program Session 2 (Cairo cycle 16)
 
Money Matters - preparing for company sale - 041113
Money Matters - preparing for company sale - 041113Money Matters - preparing for company sale - 041113
Money Matters - preparing for company sale - 041113
 

Similar a Behavior driven development

Offers Partners & Diligence Process
Offers Partners & Diligence ProcessOffers Partners & Diligence Process
Offers Partners & Diligence Process
Karthik Ethirajan
 
Oracle real time decision
Oracle real time decisionOracle real time decision
Oracle real time decision
OracleSK
 

Similar a Behavior driven development (20)

6 Month Startup Seattle - Month 4 - How Startups Make Money
6 Month Startup Seattle - Month 4 - How Startups Make Money 6 Month Startup Seattle - Month 4 - How Startups Make Money
6 Month Startup Seattle - Month 4 - How Startups Make Money
 
Offers Partners & Diligence Process
Offers Partners & Diligence ProcessOffers Partners & Diligence Process
Offers Partners & Diligence Process
 
6 Month Startup - Seattle Cohort 4 - Month 4
6 Month Startup - Seattle Cohort 4 - Month 46 Month Startup - Seattle Cohort 4 - Month 4
6 Month Startup - Seattle Cohort 4 - Month 4
 
Flat6 Labs Cairo Cycle 15 Bootcamp Day 2 with Dave Parker
Flat6 Labs Cairo Cycle 15 Bootcamp Day 2 with Dave Parker Flat6 Labs Cairo Cycle 15 Bootcamp Day 2 with Dave Parker
Flat6 Labs Cairo Cycle 15 Bootcamp Day 2 with Dave Parker
 
Flat6 Labs Bahrain Cycle 6 Bootcamp day 2
Flat6 Labs Bahrain Cycle 6 Bootcamp day 2Flat6 Labs Bahrain Cycle 6 Bootcamp day 2
Flat6 Labs Bahrain Cycle 6 Bootcamp day 2
 
KIC - WTIA Startup Bootcamp Day Two
KIC - WTIA Startup Bootcamp Day Two KIC - WTIA Startup Bootcamp Day Two
KIC - WTIA Startup Bootcamp Day Two
 
Telluride Program - Greater Colorado Venture Fund workshop
Telluride Program - Greater Colorado Venture Fund workshopTelluride Program - Greater Colorado Venture Fund workshop
Telluride Program - Greater Colorado Venture Fund workshop
 
Flat6 Labs Bahrain Cycle 5 Bootcamp Day 3
Flat6 Labs Bahrain Cycle 5 Bootcamp Day 3Flat6 Labs Bahrain Cycle 5 Bootcamp Day 3
Flat6 Labs Bahrain Cycle 5 Bootcamp Day 3
 
Sriram_Swift
Sriram_SwiftSriram_Swift
Sriram_Swift
 
Trajectory Series i-Corps How Your Startup Makes $$ (Feb 2021)
Trajectory Series i-Corps How Your Startup Makes $$ (Feb 2021)Trajectory Series i-Corps How Your Startup Makes $$ (Feb 2021)
Trajectory Series i-Corps How Your Startup Makes $$ (Feb 2021)
 
KIC - WTIA Startup Bootcamp Day 3
KIC - WTIA Startup Bootcamp Day 3KIC - WTIA Startup Bootcamp Day 3
KIC - WTIA Startup Bootcamp Day 3
 
Driving, Measuring & Turbo-Charging Client Engagement in the Legal Arena!
Driving, Measuring & Turbo-Charging Client Engagement in the Legal Arena!Driving, Measuring & Turbo-Charging Client Engagement in the Legal Arena!
Driving, Measuring & Turbo-Charging Client Engagement in the Legal Arena!
 
Flat6 Labs Cairo Cycle 14 Bootcamp Day 2
Flat6 Labs Cairo Cycle 14 Bootcamp Day 2Flat6 Labs Cairo Cycle 14 Bootcamp Day 2
Flat6 Labs Cairo Cycle 14 Bootcamp Day 2
 
roboporter columbia
roboporter columbiaroboporter columbia
roboporter columbia
 
Ace your first meeting with a VC by Ran Levitzky, Carmel Ventures
Ace your first meeting with a VC by Ran Levitzky, Carmel VenturesAce your first meeting with a VC by Ran Levitzky, Carmel Ventures
Ace your first meeting with a VC by Ran Levitzky, Carmel Ventures
 
Startup Revenue Models and Forecasting- WTIA
Startup Revenue Models and Forecasting- WTIA Startup Revenue Models and Forecasting- WTIA
Startup Revenue Models and Forecasting- WTIA
 
Rally Webinar: 4 Actionable Strategies to Win at High Volume Recruiting
Rally Webinar: 4 Actionable Strategies to Win at High Volume RecruitingRally Webinar: 4 Actionable Strategies to Win at High Volume Recruiting
Rally Webinar: 4 Actionable Strategies to Win at High Volume Recruiting
 
Digital Maturity - A Client & Agency Perspective
Digital Maturity - A Client & Agency PerspectiveDigital Maturity - A Client & Agency Perspective
Digital Maturity - A Client & Agency Perspective
 
Dhanu Reddy Resume (1)
Dhanu Reddy Resume  (1)Dhanu Reddy Resume  (1)
Dhanu Reddy Resume (1)
 
Oracle real time decision
Oracle real time decisionOracle real time decision
Oracle real time decision
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Behavior driven development

  • 2. References • “BDD in action” by John Ferguson Smart • “Specification by example” by Gojko Adzic ©TechTalks, 2018
  • 3. Agenda • What is BDD? • How it differs from complementsTDD? • Real examples onTDD/BDD • Dive deeper into BDD • Q & A ©TechTalks, 2018
  • 4. The beginning • Approach to collaboratively develop software that delivers value and is transparent • Coined and developed by Dan north • Meant to address limitations with TDD • Popular frameworks: Cucumber, Specflow, Jasmine(BDD like), Jbehave • Expressed in Gherkin language ©TechTalks, 2018
  • 5. Gherkin language Feature: Knowledge sharing session Narrative: As a speaker, I want to record my talk, so that I can replay it later for audience who could not attend Scenario: Recording a session Given: I am a speaker in a session And: I have placed a camera in the room When: I start the recording Then:The session should get recorded ©TechTalks, 2018
  • 6. What isTDD? • “Set of techniques that encourages simple design and test suites that inspire confidence” – Kent Beck • Write a failing automated test before code • Remove duplication ©TechTalks, 2018 Write code to pass the test Refactor code without letting the test fail A failing test without code
  • 7. WhyTDD? • Improves the software design • Enhances developer ability to write readable and easier-to-maintain code • Helps set the boundaries of expected work - example • Subsequently lesser defects ©TechTalks, 2018
  • 8. So where is the problem? ©TechTalks, 2018
  • 9. Persona #1 • Name: Max • Age: 35 • Occupation: Software Professional • BIO Software developer and consultant. Has a family of 4 He has just moved to Singapore on employment visa with a multi-national company. On induction, his employer, familiarized Max with the surroundings, work culture and terms of employment contract. Max is staying in a company sponsored hotel, and will need to rent a place within a week’s time. He didn’t anticipate the expenses, and is carrying little cash. He hopes he will be able to cover expenses with first salary due soon The company pays all their employees at last day of the month through bank transfers. He has joined in 3rd week of month, and needs a account soon to receive his salary in time. ©TechTalks, 2018
  • 10. Persona #2 • Name: Rob • Age 50 • Occupation: Trader and Investor • Bio Rob is anTrader and investor with business interest in Asia-pacific region. Primarily based in Singapore, he travels across China, Indonesia, Cambodia and India very frequently for business. He often employs vendors for his business and pays them through cheque post work. Due to his busy schedule and frequent travels, the payments are sometimes late and annoys the business partners. To secure his and partners business interests, he needs a easier way of making payments ©TechTalks, 2018
  • 11. Features In order to receive payments for my work, As a prospective banking customer, I want to open a savings bank account ©TechTalks, 2018 In order to make payments to contractors, As a bank customer, I want to initialize a funds transfer from my savings account Who? What? Why?
  • 12. Story #1 ©TechTalks, 2018 Title: Open a savings account In order to receive payments for my work, As a prospective banking customer, I want to open a savings account
  • 13. Acceptance criteria ©TechTalks, 2018 Inputs: - Full name - Unique identifier (NRIC, FIN, Passport) - Address - Email address - Phone number - Agreement onT&C - AccountType: Savings Output: - Account number: 6 digit unique account number - Account type: Savings - Deposit funds - Withdraw funds - Statements - Debit card
  • 14. Story #2 ©TechTalks, 2018 Title: Transfer funds from one account to another In order to make payment to contractor, As a bank customer, I want to initialize a funds transfer from my savings account
  • 15. Acceptance criteria ©TechTalks, 2018 Inputs: - From account: 6 digit account number - To account: 6 digit account number - Amount: Decimal value greater than ZERO(0). Referred hereafter as $ Output: - Transaction id: Numeric id - From account debited of $(decimal value) - To account credited of $(decimal value)
  • 17. The limitation withTDD • What all to test? How much to test? What should we name it? • How to validate that tests cover the acceptance criteria? • Maintenance and readability a challenge as product grows in size • Does it the right way. But does it do the right thing? ©TechTalks, 2018
  • 19. What is BDD again? • BDD =TDD + Enhanced business collaboration • Aligned to the business value • A single source of truth – equally understood by business and development teams ©TechTalks, 2018
  • 20. Whose behavior? • Business • Consumer • Customers/Beneficiaries • Staff • Govt.Agencies/Regulatory/Audit ©TechTalks, 2018
  • 21. What is value? • Increase profit - Eg. New features • Protect profit – Eg. Customer satisfaction • Reduce cost – Eg. Support • Avoid future cost – Eg. Regulatory ©TechTalks, 2018
  • 25. RCA example • The system is currently down • Why? • The underlying authentication service is failing so we cannot log in • Why? • The authentication service cannot connect to repository • Why? • The connection parameters are incorrect • Why? • There was a change in database host name which was not updated in authentication service ©TechTalks, 2018
  • 26. Applied to goal discovery • We want to offer $ 25 cashback for customers who do less than 10 withdrawals a month? • Why do you offer that? • A promotion will encourage more customers to do lesser withdrawals • Why do you want to encourage them? • By means of that, we want to promote cashless transactions • Why so? • Because we want to reduce usage of ATM • Why? • Maintaining the ATMs is an additional cost, and our analysis suggests that we will be able to save cost by 5% by reducing usage ©TechTalks, 2018
  • 27. Impact mapping ©TechTalks, 2018 Why? Who? How? What? Business Goal Stakeholders Capabilities Features Save the cost by 5% Enable cashless transactions Offer cashback on less than 10 withdrawals Pay online Pay by card Pay by cheque Capture number of transactions
  • 29. Seek example • “Can you give me an example?” • Precise specifications so delivery teams avoid rework caused by ambiguity • Objective way to measure when work is complete • Documentation to facilitate change, both in terms of features and team structure • Described in book “Specification by Example” by Gojko Adzie ©TechTalks, 2018
  • 31. BDD in a nutshell ©TechTalks, 2018