SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
A L I N P A N D I C H I -
BEHAVIOR DRIVEN
DEVELOPMENT
A RECAP
SOFTWARE DEVELOPER, TRAINER AND
COACH @ MOZAICWORKS
BDD HAS GOT A BIT
CONFLATED WITH
ACCEPTANCE TESTING IN
THE PHP COMMUNITY
BECAUSE OF TOOLS LIKE
BEHAT AND
CODECEPTION.
A R E D D I T U S E R
BDD IS MORE
ABOUT WORKFLOW
AND MINDSET
RATHER THAN
TOOLING.
A N O T H E R R E D D I T U S E R
OVER TIME, BDD HAS
GROWN TO ENCOMPASS
THE WIDER PICTURE OF
AGILE ANALYSIS AND
AUTOMATED
ACCEPTANCE TESTING.
D A N N O R T H
WE MUST GO
BACK TO TDD
T O U N D E R S T A N D B D D . . .
HTTP://BLOG.THEFIREHOSEPROJECT.COM/POSTS/TEST-DRIVEN-DEVELOPMENT-RSPEC-VS-TEST-UNIT/
TYPICAL DEV PROBLEMS IN TDD:
- W H E R E T O S T A R T
- W H A T T O T E S T
- W H A T N O T T O T E S T
- H O W M U C H T O T E S T
- W H A T T O C A L L T H E I R T E S T S
- H O W T O U N D E R S T A N D W H Y
A T E S T F A I L S
S T E P S T O W A R D S B D D
TEST METHOD NAMES SHOULD BE SENTENCES
01
S T E P S T O W A R D S B D D
TEST METHOD NAMES SHOULD BE SENTENCES
01
public class CustomerLookupTest extends TestCase {
   testFindsCustomerById() {
   }
   testFailsForDuplicateCustomers() {
   }
}
S T E P S T O W A R D S B D D
THE CONVENTION OF STARTING TEST METHOD NAMES
WITH THE WORD “SHOULD”
02
S T E P S T O W A R D S B D D
REMOVED ANY REFERENCE TO TESTING AND REPLACED
IT WITH A VOCABULARY BUILT AROUND VERIFYING
BEHAVIOUR
03
S T E P S T O W A R D S B D D
03
public class CustomerLookupTest extends TestCase {
   testFindsCustomerById() {
   }
   testFailsForDuplicateCustomers() {
   }
}
CustomerLookup
- should find customer by id
- should fail for duplicate customers
- ...
S T E P S T O W A R D S B D D
DISCOVERED THE CONCEPT OF BUSINESS VALUE
04
I HAD ALWAYS BEEN AWARE
THAT I WROTE SOFTWARE FOR
A REASON,
BUT I HAD NEVER REALLY
THOUGHT ABOUT THE VALUE
OF THE CODE I WAS WRITING
RIGHT NOW.
D A N N O R T H
S T E P S T O W A R D S B D D
WHAT’S THE NEXT MOST IMPORTANT THING
THE SYSTEM DOESN’T DO?
05
BUT THAT’S JUST LIKE
ANALYSIS.
Y O U , R I G H T N O W
S T E P S T O W A R D S B D D
APPLY ALL OF THIS BEHAVIOUR-DRIVEN THINKING
TO DEFINING REQUIREMENTS
S T E P S T O W A R D S B D D
DEVELOP A CONSISTENT VOCABULARY FOR ANALYSTS,
TESTERS, DEVELOPERS, AND THE BUSINESS ...
S T E P S T O W A R D S B D D
...ELIMINATING SOME OF THE AMBIGUITY AND
MISCOMMUNICATION THAT OCCUR WHEN TECHNICAL
PEOPLE TALK TO BUSINESS PEOPLE.
A S T A R T I N G P O I N T .
USER STORY TEMPLATES
As a [X]
I want [Y]
so that [Z]
A S T A R T I N G P O I N T .
USER STORY TEMPLATES
As a [X]
I want [Y]
so that [Z]
I want [some feature]
So that... [I just do, ok?]
A S T A R T I N G P O I N T .
USER STORY TEMPLATES
As an Endava employee
I want to ride an elevator to my
office
So that I don't sweat climbing 10
floors using the stairs.
IT SAYS NOTHING ABOUT THE BE BEHAVIOUR OF
THE ELEVATOR
As an Endava employee
I want to ride an elevator to my
office
So that I don't sweat climbing 10
floors using the stairs.
A STORY’S BEHAVIOUR IS SIMPLY ITS
ACCEPTANCE CRITERIA
As an Endava employee
I want to ride an elevator to my
office
So that I don't sweat climbing 10
floors using the stairs.
DESCRIBE THE ACCEPTANCE CRITERIA IN TERMS
OF SCENARIOS
As an Endava employee
I want to ride an elevator to my
office
So that I don't sweat climbing 10
floors using the stairs.
DESCRIBE THE ACCEPTANCE CRITERIA IN TERMS
OF SCENARIOS
Given some initial context,
When an event occurs,
then ensure some outcomes.
ACCEPTANCE CRITERIA IN TERMS OF SCENARIOS
Scenario:
Given I am on the 0 floor
And the elevator is on the 0 floor
And a call for 3 floor is registered
And a call for -1 floor is registered
When I call elevator
And the elevator operates
Then the elevator opens door on -1 level
Then the elevator opens door on 0 level
Then the elevator opens door on 3 level
F I N A L L Y . . .
ACCEPTANCE CRITERIA COULD BE EXECUTABLE
THE VISION IS TO HAVE A
ROUND-TRIP EDITOR SO THAT
BA`S AND TESTERS CAN
CAPTURE STORIES IN A
REGULAR TEXT EDITOR THAT
CAN GENERATE STUBS FOR
THE BEHAVIOUR CLASSES, ALL
IN THE LANGUAGE OF THE
BUSINESS DOMAIN.
D A N N O R T H
BDD PRACTITIONERS
EXPLORE, DISCOVER, DEFINE,
THEN DRIVE OUT THE DESIRED
BEHAVIOUR OF SOFTWARE
USING CONVERSATIONS,
CONCRETE EXAMPLES AND
AUTOMATED TESTS.
M A T T W Y N N E
HTTPS://TWITTER.COM/ANTONYMARCANO/STATUS/894822480141066240
A GROUP OF PEOPLE
SPECIFYING HOW
SOFTWARE SHOULD
BEHAVE BEFORE
IMPLEMENTING IT.
D A N N O R T H
N O T T H I S !
HTTPS://TWITTER.COM/SEBROSE/STATUS/913080462444253184
C E R T A I N L Y N O T T H I S !
HTTP://LABS.IG.COM/CODE-COVERAGE-100-PERCENT-TRAGEDY
R E A D M O R E :
HTTPS://DANNORTH.NET/INTRODUCING-BDD/
HTTP://LABS.IG.COM/CODE-COVERAGE-100-
PERCENT-TRAGEDY
HTTPS://WWW.YOUTUBE.COM
/WATCH?V=L95DSKM5FBY
HTTPS://GITHUB.COM/MSEKNIBILEL/ELEVATOR-
BDD-KATA
T H A N K
Y O U !
A L I N P A N D I C H I
@ALINPANDICHI
ALIN.PANDICHI@MOZAICWORKS.COM

Contenu connexe

Similaire à Behavior driven development - a recap (@ Symfony Bucharest Meetup)

Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationTechWell
 
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 bddEduardo Riol
 
Metwally - BIM Portfolio
Metwally - BIM PortfolioMetwally - BIM Portfolio
Metwally - BIM PortfolioMohammed Salah
 
Metwally - BIM ShowroomV1.0
Metwally - BIM ShowroomV1.0Metwally - BIM ShowroomV1.0
Metwally - BIM ShowroomV1.0Mohammed Salah
 
Design Thinking - From making people want things to making thing people want
Design Thinking - From making people want things to making thing people want Design Thinking - From making people want things to making thing people want
Design Thinking - From making people want things to making thing people want Filippo Scorza
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Amazon Web Services
 
Metwally - BIM Showroom
Metwally - BIM ShowroomMetwally - BIM Showroom
Metwally - BIM ShowroomMohammed Salah
 
Metwally - BIM ShowroomV1.1
Metwally - BIM ShowroomV1.1Metwally - BIM ShowroomV1.1
Metwally - BIM ShowroomV1.1Mohammed Salah
 
Enabling New Voice Experiences with Amazon Alexa and AWS Lambda
Enabling New Voice Experiences with Amazon Alexa and AWS LambdaEnabling New Voice Experiences with Amazon Alexa and AWS Lambda
Enabling New Voice Experiences with Amazon Alexa and AWS LambdaAmazon Web Services
 
How to focus - design your new app in 60 minutes!
How to focus - design your new app in 60 minutes!How to focus - design your new app in 60 minutes!
How to focus - design your new app in 60 minutes!Zach Pousman
 
Chris Girolamo It's the Product not the Project 19 Mar 14
Chris Girolamo It's the Product not the Project 19 Mar 14Chris Girolamo It's the Product not the Project 19 Mar 14
Chris Girolamo It's the Product not the Project 19 Mar 14LianaEliz222
 
Beyond DevOps: Finding Value through Requirements
Beyond DevOps: Finding Value through RequirementsBeyond DevOps: Finding Value through Requirements
Beyond DevOps: Finding Value through RequirementsGail Murphy
 
DevOps Is Not What You Have Been Told It Is
DevOps Is Not What You Have Been Told It IsDevOps Is Not What You Have Been Told It Is
DevOps Is Not What You Have Been Told It IsChristian Melendez
 
UX? No thanks it just costs more money
UX? No thanks it just costs more moneyUX? No thanks it just costs more money
UX? No thanks it just costs more moneyIIBA UK Chapter
 
Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?cornelia davis
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1willmation
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2Hammad Rajjoub
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2Hammad Rajjoub
 

Similaire à Behavior driven development - a recap (@ Symfony Bucharest Meetup) (20)

Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber Implementation
 
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
 
Metwally - BIM Portfolio
Metwally - BIM PortfolioMetwally - BIM Portfolio
Metwally - BIM Portfolio
 
Metwally - BIM ShowroomV1.0
Metwally - BIM ShowroomV1.0Metwally - BIM ShowroomV1.0
Metwally - BIM ShowroomV1.0
 
Design Thinking - From making people want things to making thing people want
Design Thinking - From making people want things to making thing people want Design Thinking - From making people want things to making thing people want
Design Thinking - From making people want things to making thing people want
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018
 
Metwally - BIM Showroom
Metwally - BIM ShowroomMetwally - BIM Showroom
Metwally - BIM Showroom
 
Metwally - BIM ShowroomV1.1
Metwally - BIM ShowroomV1.1Metwally - BIM ShowroomV1.1
Metwally - BIM ShowroomV1.1
 
Enabling New Voice Experiences with Amazon Alexa and AWS Lambda
Enabling New Voice Experiences with Amazon Alexa and AWS LambdaEnabling New Voice Experiences with Amazon Alexa and AWS Lambda
Enabling New Voice Experiences with Amazon Alexa and AWS Lambda
 
How to focus - design your new app in 60 minutes!
How to focus - design your new app in 60 minutes!How to focus - design your new app in 60 minutes!
How to focus - design your new app in 60 minutes!
 
Chris Girolamo It's the Product not the Project 19 Mar 14
Chris Girolamo It's the Product not the Project 19 Mar 14Chris Girolamo It's the Product not the Project 19 Mar 14
Chris Girolamo It's the Product not the Project 19 Mar 14
 
Beyond DevOps: Finding Value through Requirements
Beyond DevOps: Finding Value through RequirementsBeyond DevOps: Finding Value through Requirements
Beyond DevOps: Finding Value through Requirements
 
DevOps Is Not What You Have Been Told It Is
DevOps Is Not What You Have Been Told It IsDevOps Is Not What You Have Been Told It Is
DevOps Is Not What You Have Been Told It Is
 
UX? No thanks it just costs more money
UX? No thanks it just costs more moneyUX? No thanks it just costs more money
UX? No thanks it just costs more money
 
Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?
 
UX for startups
UX for startupsUX for startups
UX for startups
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
A year on the edge.pdf
A year on the edge.pdfA year on the edge.pdf
A year on the edge.pdf
 

Plus de Alin Pandichi

[Codecamp] The sorry state of frontend code
[Codecamp] The sorry state of frontend code[Codecamp] The sorry state of frontend code
[Codecamp] The sorry state of frontend codeAlin Pandichi
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Alin Pandichi
 
Coding Dojo - The learning remote control
Coding Dojo - The learning remote controlCoding Dojo - The learning remote control
Coding Dojo - The learning remote controlAlin Pandichi
 
The sorry state of frontend code [a talk @ Softbinator]
The sorry state of frontend code [a talk @ Softbinator] The sorry state of frontend code [a talk @ Softbinator]
The sorry state of frontend code [a talk @ Softbinator] Alin Pandichi
 
The sorry state of frontend code
The sorry state of frontend codeThe sorry state of frontend code
The sorry state of frontend codeAlin Pandichi
 
How to unit test your React/Redux app
How to unit test your React/Redux appHow to unit test your React/Redux app
How to unit test your React/Redux appAlin Pandichi
 
Covariance and contravariance. Say what?! (Agile Talks #22)
Covariance and contravariance. Say what?! (Agile Talks #22)Covariance and contravariance. Say what?! (Agile Talks #22)
Covariance and contravariance. Say what?! (Agile Talks #22)Alin Pandichi
 
Coding Dojo - Berlin Clock - TDD
Coding Dojo - Berlin Clock - TDDCoding Dojo - Berlin Clock - TDD
Coding Dojo - Berlin Clock - TDDAlin Pandichi
 
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-Alin Pandichi
 
Coding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataCoding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataAlin Pandichi
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspectiveAlin Pandichi
 
Java 8 - Lambdas and much more
Java 8 - Lambdas and much moreJava 8 - Lambdas and much more
Java 8 - Lambdas and much moreAlin Pandichi
 

Plus de Alin Pandichi (13)

[Codecamp] The sorry state of frontend code
[Codecamp] The sorry state of frontend code[Codecamp] The sorry state of frontend code
[Codecamp] The sorry state of frontend code
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
 
Coding Dojo - The learning remote control
Coding Dojo - The learning remote controlCoding Dojo - The learning remote control
Coding Dojo - The learning remote control
 
The sorry state of frontend code [a talk @ Softbinator]
The sorry state of frontend code [a talk @ Softbinator] The sorry state of frontend code [a talk @ Softbinator]
The sorry state of frontend code [a talk @ Softbinator]
 
The sorry state of frontend code
The sorry state of frontend codeThe sorry state of frontend code
The sorry state of frontend code
 
How to unit test your React/Redux app
How to unit test your React/Redux appHow to unit test your React/Redux app
How to unit test your React/Redux app
 
Covariance and contravariance. Say what?! (Agile Talks #22)
Covariance and contravariance. Say what?! (Agile Talks #22)Covariance and contravariance. Say what?! (Agile Talks #22)
Covariance and contravariance. Say what?! (Agile Talks #22)
 
Coding Dojo - Berlin Clock - TDD
Coding Dojo - Berlin Clock - TDDCoding Dojo - Berlin Clock - TDD
Coding Dojo - Berlin Clock - TDD
 
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-
Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-
 
Coding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis KataCoding Dojo - Refactoring Tennis Kata
Coding Dojo - Refactoring Tennis Kata
 
Avatar.js
Avatar.jsAvatar.js
Avatar.js
 
Software development - the java perspective
Software development - the java perspectiveSoftware development - the java perspective
Software development - the java perspective
 
Java 8 - Lambdas and much more
Java 8 - Lambdas and much moreJava 8 - Lambdas and much more
Java 8 - Lambdas and much more
 

Dernier

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 

Dernier (20)

Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 

Behavior driven development - a recap (@ Symfony Bucharest Meetup)

  • 1. A L I N P A N D I C H I - BEHAVIOR DRIVEN DEVELOPMENT A RECAP SOFTWARE DEVELOPER, TRAINER AND COACH @ MOZAICWORKS
  • 2. BDD HAS GOT A BIT CONFLATED WITH ACCEPTANCE TESTING IN THE PHP COMMUNITY BECAUSE OF TOOLS LIKE BEHAT AND CODECEPTION. A R E D D I T U S E R
  • 3. BDD IS MORE ABOUT WORKFLOW AND MINDSET RATHER THAN TOOLING. A N O T H E R R E D D I T U S E R
  • 4. OVER TIME, BDD HAS GROWN TO ENCOMPASS THE WIDER PICTURE OF AGILE ANALYSIS AND AUTOMATED ACCEPTANCE TESTING. D A N N O R T H
  • 5. WE MUST GO BACK TO TDD T O U N D E R S T A N D B D D . . .
  • 7. TYPICAL DEV PROBLEMS IN TDD: - W H E R E T O S T A R T - W H A T T O T E S T - W H A T N O T T O T E S T - H O W M U C H T O T E S T - W H A T T O C A L L T H E I R T E S T S - H O W T O U N D E R S T A N D W H Y A T E S T F A I L S
  • 8. S T E P S T O W A R D S B D D TEST METHOD NAMES SHOULD BE SENTENCES 01
  • 9. S T E P S T O W A R D S B D D TEST METHOD NAMES SHOULD BE SENTENCES 01 public class CustomerLookupTest extends TestCase {    testFindsCustomerById() {    }    testFailsForDuplicateCustomers() {    } }
  • 10. S T E P S T O W A R D S B D D THE CONVENTION OF STARTING TEST METHOD NAMES WITH THE WORD “SHOULD” 02
  • 11. S T E P S T O W A R D S B D D REMOVED ANY REFERENCE TO TESTING AND REPLACED IT WITH A VOCABULARY BUILT AROUND VERIFYING BEHAVIOUR 03
  • 12. S T E P S T O W A R D S B D D 03 public class CustomerLookupTest extends TestCase {    testFindsCustomerById() {    }    testFailsForDuplicateCustomers() {    } } CustomerLookup - should find customer by id - should fail for duplicate customers - ...
  • 13. S T E P S T O W A R D S B D D DISCOVERED THE CONCEPT OF BUSINESS VALUE 04
  • 14. I HAD ALWAYS BEEN AWARE THAT I WROTE SOFTWARE FOR A REASON, BUT I HAD NEVER REALLY THOUGHT ABOUT THE VALUE OF THE CODE I WAS WRITING RIGHT NOW. D A N N O R T H
  • 15. S T E P S T O W A R D S B D D WHAT’S THE NEXT MOST IMPORTANT THING THE SYSTEM DOESN’T DO? 05
  • 16. BUT THAT’S JUST LIKE ANALYSIS. Y O U , R I G H T N O W
  • 17. S T E P S T O W A R D S B D D APPLY ALL OF THIS BEHAVIOUR-DRIVEN THINKING TO DEFINING REQUIREMENTS
  • 18. S T E P S T O W A R D S B D D DEVELOP A CONSISTENT VOCABULARY FOR ANALYSTS, TESTERS, DEVELOPERS, AND THE BUSINESS ...
  • 19. S T E P S T O W A R D S B D D ...ELIMINATING SOME OF THE AMBIGUITY AND MISCOMMUNICATION THAT OCCUR WHEN TECHNICAL PEOPLE TALK TO BUSINESS PEOPLE.
  • 20. A S T A R T I N G P O I N T . USER STORY TEMPLATES As a [X] I want [Y] so that [Z]
  • 21. A S T A R T I N G P O I N T . USER STORY TEMPLATES As a [X] I want [Y] so that [Z] I want [some feature] So that... [I just do, ok?]
  • 22. A S T A R T I N G P O I N T . USER STORY TEMPLATES As an Endava employee I want to ride an elevator to my office So that I don't sweat climbing 10 floors using the stairs.
  • 23. IT SAYS NOTHING ABOUT THE BE BEHAVIOUR OF THE ELEVATOR As an Endava employee I want to ride an elevator to my office So that I don't sweat climbing 10 floors using the stairs.
  • 24. A STORY’S BEHAVIOUR IS SIMPLY ITS ACCEPTANCE CRITERIA As an Endava employee I want to ride an elevator to my office So that I don't sweat climbing 10 floors using the stairs.
  • 25. DESCRIBE THE ACCEPTANCE CRITERIA IN TERMS OF SCENARIOS As an Endava employee I want to ride an elevator to my office So that I don't sweat climbing 10 floors using the stairs.
  • 26. DESCRIBE THE ACCEPTANCE CRITERIA IN TERMS OF SCENARIOS Given some initial context, When an event occurs, then ensure some outcomes.
  • 27. ACCEPTANCE CRITERIA IN TERMS OF SCENARIOS Scenario: Given I am on the 0 floor And the elevator is on the 0 floor And a call for 3 floor is registered And a call for -1 floor is registered When I call elevator And the elevator operates Then the elevator opens door on -1 level Then the elevator opens door on 0 level Then the elevator opens door on 3 level
  • 28. F I N A L L Y . . . ACCEPTANCE CRITERIA COULD BE EXECUTABLE
  • 29. THE VISION IS TO HAVE A ROUND-TRIP EDITOR SO THAT BA`S AND TESTERS CAN CAPTURE STORIES IN A REGULAR TEXT EDITOR THAT CAN GENERATE STUBS FOR THE BEHAVIOUR CLASSES, ALL IN THE LANGUAGE OF THE BUSINESS DOMAIN. D A N N O R T H
  • 30. BDD PRACTITIONERS EXPLORE, DISCOVER, DEFINE, THEN DRIVE OUT THE DESIRED BEHAVIOUR OF SOFTWARE USING CONVERSATIONS, CONCRETE EXAMPLES AND AUTOMATED TESTS. M A T T W Y N N E
  • 32. A GROUP OF PEOPLE SPECIFYING HOW SOFTWARE SHOULD BEHAVE BEFORE IMPLEMENTING IT. D A N N O R T H
  • 33. N O T T H I S ! HTTPS://TWITTER.COM/SEBROSE/STATUS/913080462444253184
  • 34. C E R T A I N L Y N O T T H I S ! HTTP://LABS.IG.COM/CODE-COVERAGE-100-PERCENT-TRAGEDY
  • 35. R E A D M O R E : HTTPS://DANNORTH.NET/INTRODUCING-BDD/ HTTP://LABS.IG.COM/CODE-COVERAGE-100- PERCENT-TRAGEDY HTTPS://WWW.YOUTUBE.COM /WATCH?V=L95DSKM5FBY HTTPS://GITHUB.COM/MSEKNIBILEL/ELEVATOR- BDD-KATA
  • 36. T H A N K Y O U ! A L I N P A N D I C H I @ALINPANDICHI ALIN.PANDICHI@MOZAICWORKS.COM