SlideShare a Scribd company logo
1 of 20
Specification by Example
(BDD)
Agenda
• Software Development Challenges
• BDD to the Rescue
• Spec Examples
• Automation Tools
Creating software products
is challenging…
requirements code
S P
Cliqz
Cost of translation
years
weeks
Behaviour Driven Development
BDD is about eliminating Translation cost
from business to developers
using the language of examples
business goals
specifying
deriving scope
collaboratively specify
examples
refining specification
automated
validation of specifications
building
living documentation
requirements code
S P
years
weeks
Cost of translation
examples
BDD
${ } { }
DDD
Spec examples
What makes a good test
• In domain language
• Easy to understand
• Precise and testable
• Self-explanatory
• Consistent
evaluation scenarios
3D-secure v1
Feature: 3d Secure
In order to reduce chargeback costs
As a system owner
I want players to go through 3D secure enrollment and verification
Background
Given the card number 4236754 is enrolled
And the card number 2341238 is not enrolled
Scenario: Enrolled card
Given the player has a card with number 4236754
And expiry date 12 11
And address line 1 Max Weber Platz 23
And address line 2 1st floor
And post code 12300
And city Viena
And country Austria
When the player starts a transaction for 10 EUR
Then the system will send a message “””
<message type=“ENROLMENT_CHK_MSG”>
<CARD> 4236754</CARD>
</message>
“””
And the system will receive a response “””
<response>
<ENROLEMENT_CHK>enrolled</ENROLEMENT_CHK>
</response>
“””
3D-secure v1
Then the system will send a message “””
<message type=“3D_AUTHORIZE”>
<CARD>4236754</CARD>
<EXPIRY>1211</EXPIRY>
<ADDRESS_LINE1>Max Weber Platz 23</ADDRESS_LINE_1>
<ADDRESS_LINE2>1st floor</ADDRESS_LINE_1>
<POST_CODE>12300</POST_CODE>
<CITY>VIENNA</CITY>
<COUNTRY>AUSTRIA</COUNTRY>
</message>
“””
And the system will receive a response “””
<response>
<AUTHORIZE>
<3D_SECURE_URL>http://hsbc.co.uk</3D_SECURE_URL>
<PA_REQ>232325454-444444232323232</PA_REQ>
</AUTHORIZE>
</response>
“””
And the system will redirect the user to http://hsbc.co.uk
And the PA-REQ code in the form will be 232325454-444444232323232
3D-secure v2
Feature: Card enrollment with 3d Secure
In order to reduce chargeback costs
As a system owner
I want players to go through 3D secure enrollment and verification
before proceeding with actual authorization
Scenario Outline: 3d transaction processing
Given the card was <enrolled>
And 3D Secure gateway response was <response>
Then the transaction status is <status>
Examples: Response arrived
Examples: still waiting for response
Examples: card not enrolled, so not going through 3D at all
enrolled response status
YES cancel CANCELLED
YES authorize
PENDING_AUTHORIZATION
enrolled response status
YES not received yet PENDING 3D SECURE
enrolled response status
NO not received yet PENDING AUTHORIZATION
Automation tools
• Cucumber: http://cucumber.io
• JBehave: http://jbehave.org
• SpecFlow: http://www.specflow.org
• Appium: http://appium.io/

More Related Content

Similar to BDD / Specification by example

Streamlining licensing migration from 3rd party systems
Streamlining licensing migration from 3rd party systemsStreamlining licensing migration from 3rd party systems
Streamlining licensing migration from 3rd party systemsteam-WIBU
 
KanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowKanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowBernd Ruecker
 
O'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systemsO'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systemsBernd Ruecker
 
Sensor Interface Descriptors (SID)
Sensor Interface Descriptors (SID)Sensor Interface Descriptors (SID)
Sensor Interface Descriptors (SID)Arne Bröring
 
Sample 3D Projects_ TMA Solutions
Sample 3D Projects_ TMA SolutionsSample 3D Projects_ TMA Solutions
Sample 3D Projects_ TMA SolutionsTMA Solutions
 
How to be a smart contract engineer
How to be a smart contract engineerHow to be a smart contract engineer
How to be a smart contract engineerOded Noam
 
Kristopher Moyer Resume 04072016
Kristopher Moyer Resume 04072016Kristopher Moyer Resume 04072016
Kristopher Moyer Resume 04072016Kris Moyer
 
3D-Secure 2.2 Webinar
3D-Secure 2.2 Webinar3D-Secure 2.2 Webinar
3D-Secure 2.2 WebinarIvona M
 
In the Middle of Printers: (In)security of Pull Printing Solutions
In the Middle of Printers: (In)security of Pull Printing SolutionsIn the Middle of Printers: (In)security of Pull Printing Solutions
In the Middle of Printers: (In)security of Pull Printing SolutionsPositive Hack Days
 
Kerberos Survival Guide SPS Chicago
Kerberos Survival Guide SPS ChicagoKerberos Survival Guide SPS Chicago
Kerberos Survival Guide SPS ChicagoJ.D. Wade
 
You Haven't Seen This 3D Engineering's Overview List on Buzzfeed
You Haven't Seen This 3D Engineering's Overview List on BuzzfeedYou Haven't Seen This 3D Engineering's Overview List on Buzzfeed
You Haven't Seen This 3D Engineering's Overview List on BuzzfeedNick Stojanovic
 
[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dAppsOWASP
 
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-IT
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-ITDeploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-IT
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-ITMd. Abdul Barek
 
Arm board design odm electronic
Arm board design odm electronicArm board design odm electronic
Arm board design odm electronicVenkatesh Dhanapal
 
Engineering Document Management Software | EDMS Software Overview
Engineering Document Management Software | EDMS Software OverviewEngineering Document Management Software | EDMS Software Overview
Engineering Document Management Software | EDMS Software OverviewWrench Solutions (P) Ltd
 
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standardsWebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standardsSecuRing
 
The Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedThe Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedPaloSanto Solutions
 

Similar to BDD / Specification by example (20)

Streamlining licensing migration from 3rd party systems
Streamlining licensing migration from 3rd party systemsStreamlining licensing migration from 3rd party systems
Streamlining licensing migration from 3rd party systems
 
KanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowKanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flow
 
O'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systemsO'Reilly SA: Complex event flows in distributed systems
O'Reilly SA: Complex event flows in distributed systems
 
Sensor Interface Descriptors (SID)
Sensor Interface Descriptors (SID)Sensor Interface Descriptors (SID)
Sensor Interface Descriptors (SID)
 
Virtual Design and Construction
Virtual Design and ConstructionVirtual Design and Construction
Virtual Design and Construction
 
Sample 3D Projects_ TMA Solutions
Sample 3D Projects_ TMA SolutionsSample 3D Projects_ TMA Solutions
Sample 3D Projects_ TMA Solutions
 
How to be a smart contract engineer
How to be a smart contract engineerHow to be a smart contract engineer
How to be a smart contract engineer
 
Secure Electronic Transaction (SET)
Secure Electronic Transaction (SET)Secure Electronic Transaction (SET)
Secure Electronic Transaction (SET)
 
Kristopher Moyer Resume 04072016
Kristopher Moyer Resume 04072016Kristopher Moyer Resume 04072016
Kristopher Moyer Resume 04072016
 
3D-Secure 2.2 Webinar
3D-Secure 2.2 Webinar3D-Secure 2.2 Webinar
3D-Secure 2.2 Webinar
 
In the Middle of Printers: (In)security of Pull Printing Solutions
In the Middle of Printers: (In)security of Pull Printing SolutionsIn the Middle of Printers: (In)security of Pull Printing Solutions
In the Middle of Printers: (In)security of Pull Printing Solutions
 
Kerberos Survival Guide SPS Chicago
Kerberos Survival Guide SPS ChicagoKerberos Survival Guide SPS Chicago
Kerberos Survival Guide SPS Chicago
 
You Haven't Seen This 3D Engineering's Overview List on Buzzfeed
You Haven't Seen This 3D Engineering's Overview List on BuzzfeedYou Haven't Seen This 3D Engineering's Overview List on Buzzfeed
You Haven't Seen This 3D Engineering's Overview List on Buzzfeed
 
[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps
 
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-IT
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-ITDeploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-IT
Deploy & Configure Remote Desktop Gateway in Windows Server 2008 R2 By Barek-IT
 
Arm board design odm electronic
Arm board design odm electronicArm board design odm electronic
Arm board design odm electronic
 
Engineering Document Management Software | EDMS Software Overview
Engineering Document Management Software | EDMS Software OverviewEngineering Document Management Software | EDMS Software Overview
Engineering Document Management Software | EDMS Software Overview
 
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standardsWebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
 
12 Years in DNS Security As a Defender
12 Years in DNS Security As a Defender12 Years in DNS Security As a Defender
12 Years in DNS Security As a Defender
 
The Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedThe Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol Revealed
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

BDD / Specification by example

  • 2. Agenda • Software Development Challenges • BDD to the Rescue • Spec Examples • Automation Tools
  • 4. requirements code S P Cliqz Cost of translation years weeks
  • 5.
  • 6. Behaviour Driven Development BDD is about eliminating Translation cost from business to developers using the language of examples
  • 13. requirements code S P years weeks Cost of translation examples BDD ${ } { } DDD
  • 15. What makes a good test • In domain language • Easy to understand • Precise and testable • Self-explanatory • Consistent
  • 17. 3D-secure v1 Feature: 3d Secure In order to reduce chargeback costs As a system owner I want players to go through 3D secure enrollment and verification Background Given the card number 4236754 is enrolled And the card number 2341238 is not enrolled Scenario: Enrolled card Given the player has a card with number 4236754 And expiry date 12 11 And address line 1 Max Weber Platz 23 And address line 2 1st floor And post code 12300 And city Viena And country Austria When the player starts a transaction for 10 EUR Then the system will send a message “”” <message type=“ENROLMENT_CHK_MSG”> <CARD> 4236754</CARD> </message> “”” And the system will receive a response “”” <response> <ENROLEMENT_CHK>enrolled</ENROLEMENT_CHK> </response> “””
  • 18. 3D-secure v1 Then the system will send a message “”” <message type=“3D_AUTHORIZE”> <CARD>4236754</CARD> <EXPIRY>1211</EXPIRY> <ADDRESS_LINE1>Max Weber Platz 23</ADDRESS_LINE_1> <ADDRESS_LINE2>1st floor</ADDRESS_LINE_1> <POST_CODE>12300</POST_CODE> <CITY>VIENNA</CITY> <COUNTRY>AUSTRIA</COUNTRY> </message> “”” And the system will receive a response “”” <response> <AUTHORIZE> <3D_SECURE_URL>http://hsbc.co.uk</3D_SECURE_URL> <PA_REQ>232325454-444444232323232</PA_REQ> </AUTHORIZE> </response> “”” And the system will redirect the user to http://hsbc.co.uk And the PA-REQ code in the form will be 232325454-444444232323232
  • 19. 3D-secure v2 Feature: Card enrollment with 3d Secure In order to reduce chargeback costs As a system owner I want players to go through 3D secure enrollment and verification before proceeding with actual authorization Scenario Outline: 3d transaction processing Given the card was <enrolled> And 3D Secure gateway response was <response> Then the transaction status is <status> Examples: Response arrived Examples: still waiting for response Examples: card not enrolled, so not going through 3D at all enrolled response status YES cancel CANCELLED YES authorize PENDING_AUTHORIZATION enrolled response status YES not received yet PENDING 3D SECURE enrolled response status NO not received yet PENDING AUTHORIZATION
  • 20. Automation tools • Cucumber: http://cucumber.io • JBehave: http://jbehave.org • SpecFlow: http://www.specflow.org • Appium: http://appium.io/