際際滷

際際滷Share a Scribd company logo
BDD
Behaviour Driven Development
What Is BDD ?
Set Of Behaviours that Customer Can Expect from the System.
BDD can be written at any Time Before During After Development.
Business people can focus on the Behaviors that matter to the customer.
Traditional Development Process
Stakeholders Tells Product Owner what business need.
Product Owner will write requirements
Testers Developers will take requirements from Product Owner and translate it to
code
BDD Development Process
Stakeholders & Product Owner Talk about what business need.
Product Owner talk with the team and start explaining what is we developing here
and Giving Examples
Team and Product Owner Write Scenarios in form of Given When Then
Starting State
Context
Outcome
Event What The User Does
The Expected Results
Given the Balance is 100 EGP
And the Card is Valid
And the Machine Have Enough money
Context
Outcome
Event When Account Holder request 20 EGP
Then the machine should dispense 20 EGP
And Account Balance should be 80 EGP
And the Card should be returned
BDD Vs Unit Test
BDD
ERROR: Something Went Wrong 
Doing the right thing
Developer - tester - Product owner -
Stakeholders - business owner
Putting system on state.
Slow
Unit Test
Gives you the root cause of the problem and
what exactly went wrong.
Doing the thing right
Developer
Mocking
Quick
Lets See Code
Thanks

More Related Content

Intro To BDD and Integration test

  • 2. What Is BDD ? Set Of Behaviours that Customer Can Expect from the System. BDD can be written at any Time Before During After Development. Business people can focus on the Behaviors that matter to the customer.
  • 3. Traditional Development Process Stakeholders Tells Product Owner what business need. Product Owner will write requirements Testers Developers will take requirements from Product Owner and translate it to code
  • 4. BDD Development Process Stakeholders & Product Owner Talk about what business need. Product Owner talk with the team and start explaining what is we developing here and Giving Examples Team and Product Owner Write Scenarios in form of Given When Then
  • 5. Starting State Context Outcome Event What The User Does The Expected Results
  • 6. Given the Balance is 100 EGP And the Card is Valid And the Machine Have Enough money Context Outcome Event When Account Holder request 20 EGP Then the machine should dispense 20 EGP And Account Balance should be 80 EGP And the Card should be returned
  • 7. BDD Vs Unit Test BDD ERROR: Something Went Wrong Doing the right thing Developer - tester - Product owner - Stakeholders - business owner Putting system on state. Slow Unit Test Gives you the root cause of the problem and what exactly went wrong. Doing the thing right Developer Mocking Quick