SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Downloaden Sie, um offline zu lesen
BA CL’
BDDCE QUE C’est
OU
Ce QUE C’est pas…
Arnauld Loyer
@aloyer
2014
du
http://pencilink.blogspot.fr/2010/10/iron-man-160-jim-starlin-cover-steve.html
It’s NOT about tools
It’s about Communication and Behavior!
@aloyer
http://ungoliantschilde.tumblr.com/post/78793890826/ungoliantschilde-barry-windsor-smith-that
It’s NOT about Testing
It’s about Exploring the Unknown
@aloyer
It’s not about Silo!Or Acceptance
Criteria
It’s about
Sharing
and
Understanding
@aloyer
It’s about Driven Development!
@aloyer
Qu'est ce qui se passe?
Modèle
Mental
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Modèle
Mental
Ce qui est expliqué
Ce qui
n'est pas
retranscrit Modèle
Mental
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Modèle
Mental
Ce qui est expliqué
Ce qui
n'est pas
retranscrit Modèle
Mental
Ce que l'autre comprend
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Ce qui est
spécifié
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Ce qui va
être testé
@aloyer
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Ce qui va
être testé
Ce qui est
réalisé
@aloyer
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
@aloyer
@aloyer
@aloyer
Qu'est ce qui se passe?
Correspond à l'idée initiale
Ce qui a été réalisé
@aloyer
@aloyer
Qu'est ce qui se passe?
Correspond à l'idée
initiale
Ce qui a été réalisé
NNNAaannnnnn
vs
@aloyer
@aloyer
"is this a bug or is this not a bug”
a bug?
a feature?
an enhancement?
a beature?
@aloyer
@aloyer
@aloyer
@aloyer
3 steps
3 model
3 interpretations
@aloyer
3 visions
1 model
1 goal
@aloyer
Three Amigos @aloyer
http://paintings-art-picture.com/paintings/archives/85/marvel-comics-retro-captain-america-comic-panel-fighting-phase-1-so-far-so-good-aged
BDD is writing software that matters
@aloyer
@aloyer
@aloyer
BDD is about conversation
@aloyer
@aloyer
@aloyer
@aloyer
Why?
Goal?
Business Value?
Intention What?
How!
@aloyer
@aloyer
Why?
Goal?
Business Value?
In order to <achieve the vision>
Feature: ...
As a <stakeholder>
I want <value>
Intention
As a <role>
I want <goal>
So that <value>
User focused
What?
How!
@aloyer
@aloyer
No Narrative
No Business Value
Unnecessary Feature !
@aloyer
22
http://devjam.com/2010/08/05/dudes-law-gordon-pask-shoveler/
In order to...
Feature: ...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event happens>
Then <an outcome should occur>
BDD uses examples to illustrate behavior
@aloyer
@aloyer
Why do YOU
like should?
It encourages
debate, and
constant Questioning
of the premise of the
application you are
developing.
Dan North, March 2005
@aloyer
Feature: Account Holder withdraws cash from an ATM
!
In the following scenario, ATM will stands for
Automatic Teller Machine in other word a “Cash machine”.
!
In order to get money at any time, even when the bank is
closed
As an Account Holder
I want to withdraw cash from an ATM
!
Scenario: Account has sufficient funds
Given the account balance is 100€
When the Account Holder requests 20€
Then the ATM should dispense 20€
And the account balance should be 80€
And the card should be returned
@aloyer
Scenario: Account has insufficient funds
Given the account balance is 10€
And the card is valid
And the machine contains enough money
When the Account Holder requests 30€
Then the ATM should not dispense any money
And the ATM should say there are insufficient funds
And the account balance should still be 10€
And the card should be returned
@aloyer
Scenario: Account has insufficient funds
Given the account balance is 10€
And the card is valid
And the machine contains enough money
When the Account Holder requests 30€
Then the ATM should not dispense any money
And the ATM should say there are insufficient funds
And the account balance should still be 10€
And the card should be returned
FOCUS On the BEHAVIOR DESCRIBED!
@aloyer
@aloyer
Feature: Interpolate
!
In order to interpolate values
As an Trader
I want to interpolate values in a range of Market
data
Why this feature ?
@aloyer
Feature: Linear Interpolation
In order to fill the gaps and provide a value for any
maturity
As a trader responsible for market-making
I want to interpolate linearly values within a range of
points
And I want a flat extrapolation outside of the range
of points
Why this feature ?
@aloyer
Scenario: Change the negotiation price from positive to negative
=> soulte cashflow appears and premium cashflow is modified
!
Given an FUNKY_EXOTIC
And deal way is sell
And deal nature is TOMATO
And trade value date is 2012/07/01
And nominal is 100 JPY
And negotiation price is 0.20 JPY
When I validate the deal
Then there are 1 Price cashflows
And there are 0 fee cashflows
When I change the negotiation price to -0.3 JPY
And I validate the deal
Then there are 1 Price cashflows
And there are 1 fee cashflows
And the trade cashflow's payment date is 2012/07/01
And the trade cashflow's way is receive
And the trade cashflow's amount is 30 JPY
And the fee cashflow's payment date is 2012/07/01
And the fee cashflow's way is give
And the fee cashflow's amount is 60 JPY
What about this scenario
@aloyer
What about this scenario
d = new Deal();
d.SetWay(Sell);
d.SetNature(Tomato);
d.SetValueDate(new Date(...));
d.SetNominal(100, JPY);
d.SetNegotiationPrice(0.20, JPY);
cf = d.GetCashFlows();
AssertThat(IsEqual(...);
...
Scenario: Change the negotiation price from positive to negative
=> soulte cashflow appears and premium cashflow is modified
!
Given an FUNKY_EXOTIC
And deal way is sell
And deal nature is TOMATO
And trade value date is 2012/07/01
And nominal is 100 JPY
And negotiation price is 0.20 JPY
When I validate the deal
Then there are 1 Price cashflows
And there are 0 fee cashflows
When I change the negotiation price to -0.3 JPY
And I validate the deal
Then there are 1 Price cashflows
And there are 1 fee cashflows
And the trade cashflow's payment date is 2012/07/01
And the trade cashflow's way is receive
And the trade cashflow's amount is 30 JPY
And the fee cashflow's payment date is 2012/07/01
And the fee cashflow's way is give
And the fee cashflow's amount is 60 JPY
@aloyer
SCEnARIO: Fee and Price cashflows when the negotiation price is
set to a negative value
!
Given a sell for a nominal 100 JPY on FUNKY_EXOTIC TOMATO
negotiation price 0.20 JPY traded on 2012/07/01
When the middle officer validates the deal
Then the trade has one Price cashflow and no Fee cashflow
When the middle officer changes the negotiation price to -0.3 JPY
And the middle officer validates the deal
Then the trade has the following cashflows:
What about this scenario
Communicate With the Business People !!!
FlowType
Price
Fee
Way
Receive
Give
Amount
30
60
Currency
JPY
JPY
Payment Date
2012/07/01
2012/07/01
Remarks
100*abs(-0.3)
100*2*abs(-0.3)
@aloyer
Low Tech
Scenario
@aloyer
@aloyer
@aloyer
@aloyer
@aloyer
Domain Driven Design - Eric Evans @aloyer
In order to...
Feature: ...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event happens>
Then <an outcome should occur>
Examples help discover things early
@aloyer
@aloyer
In order to...
Feature: ...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event happens>
Then <an outcome should occur>
One may discover that one doesn't know
but others do!
@aloyer
@aloyer
WHAT About Automation !?!
The
Green
Thing
?
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
"End to End"
UI
FEST, Selenium, Fluentlenium,
HtmlUnit, Watir...
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
"End to End"
Services
Web, WCF, ...
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
Sub-Module
runtime
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
"Quasi-Unitaire"
runtime
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
"Quasi-Unitaire"
runtime
Mock, Stubs...
@aloyer
GLUECODE
BDDFRAMEWORK
SCENARIO
APPLICATION
@aloyer
Scenario: Account has sufficient funds!
Given the account balance is 100€!
When the Account Holder requests 20€
Then the ATM should dispense 20€!
And the account balance should be 80€!
And the card should be returned
SCENARIO
GLUECODE
BDDFRAMEWORK
APPLICATION
@aloyer
Scenario: Account has sufficient funds!
Given the account balance is 100€!
When the Account Holder requests 20€
Then the ATM should dispense 20€!
And the account balance should be 80€!
And the card should be returned
SCENARIO
GLUECODE
BDDFRAMEWORK
APPLICATION
@aloyer
Scenario: Account has sufficient funds!
Given the account balance is 100€!
When the Account Holder requests 20€
Then the ATM should dispense 20€!
And the account balance should be 80€!
And the card should be returned
SCENARIO
@Given("^the account balance is (d+)€$")
public void defineAccountBalanceInEuro(BigDecimal
balance) {
throw new PendingException("Implements me!");
}
!
@When("^the Account Holder request (d+)€$")
public void withdrawInEuro (BigDecimal amount) {
throw new PendingException("Implements me!");
}
!
@Then("^the ATM should dispense (d+)€$")
public void assertMoneyDispensedInEuro (BigDecimal
amount) {
throw new PendingException("Implements me!");
}
!
!
!
@Then("^the account balance should be (d+)€$")
public void assertBalanceInEuro(BigDecimal amount) {
throw new PendingException("Implements me!");
}
!
GLUE CODE
APPLICATION
BDDFRAMEWORK
@aloyer
Scenario: Account has sufficient funds!
Given the account balance is 100€!
When the Account Holder requests 20€
Then the ATM should dispense 20€!
And the account balance should be 80€!
And the card should be returned
SCENARIO
@Given("^the account balance is (d+)€$")
public void defineAccountBalanceInEuro(BigDecimal
balance) {
account().setBalance(euro(balance));
}
!
@When("^the Account Holder request (d+)€$")
public void withdrawInEuro (BigDecimal amount) {
atm().withdraw(account(), euro(amount));
}
!
@Then("^the ATM should dispense (d+)€$")
public void assertMoneyDispensedInEuro (BigDecimal
amount) {
TransactionLog txLog = atm().transactionLog();!
Money dispensed = txLog.lastAmountDispensed();!
assertThat(dispensed).isEqualTo(euro(amount));
}!
!
@Then("^the account balance should be (d+)€$")
public void assertBalanceInEuro(BigDecimal amount) {
Money actualBalance = account().balance();!
assertThat(actualBalance).isEqualTo(euro(amount));
}
GLUE CODE
APPLICATION
BDDFRAMEWORK
@aloyer
And that’s all Folks…
for the Green Thing!
but remember,
you can
automate from
unit level to
end-to-end
level
@aloyer
THE Point
If only one thing must remain
@aloyer
BDD = Shared understanding
by discussing Examples
@aloyer
BDD = Shared understanding
by discussing Examples
Three AmiGOS
@aloyer
BDD = Shared understanding
by discussing Examples
Scenario
Three AmiGOS
@aloyer
@aloyer
Questions?
http://rozmaryn.deviantart.com/art/Hellboy-bw-52117973
@aloyer

Weitere ähnliche Inhalte

Andere mochten auch

The quest for global design principles (SymfonyLive Berlin 2015)
The quest for global design principles (SymfonyLive Berlin 2015)The quest for global design principles (SymfonyLive Berlin 2015)
The quest for global design principles (SymfonyLive Berlin 2015)Matthias Noback
 
Top tips my_sql_performance
Top tips my_sql_performanceTop tips my_sql_performance
Top tips my_sql_performanceafup Paris
 
Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Marcello Duarte
 
Why elasticsearch rocks!
Why elasticsearch rocks!Why elasticsearch rocks!
Why elasticsearch rocks!tlrx
 
Si le tdd est mort alors pratiquons une autopsie mix-it 2015
Si le tdd est mort alors pratiquons une autopsie mix-it 2015Si le tdd est mort alors pratiquons une autopsie mix-it 2015
Si le tdd est mort alors pratiquons une autopsie mix-it 2015Bruno Boucard
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLGabriele Bartolini
 
TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016CiaranMcNulty
 
Performance serveur et apache
Performance serveur et apachePerformance serveur et apache
Performance serveur et apacheafup Paris
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsRyan Weaver
 
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersKacper Gunia
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)securityEnrico Zimuel
 
Design how your objects talk through mocking
Design how your objects talk through mockingDesign how your objects talk through mocking
Design how your objects talk through mockingKonstantin Kudryashov
 
Measuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionMeasuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionDave Olsen
 
Composer in monolithic repositories
Composer in monolithic repositoriesComposer in monolithic repositories
Composer in monolithic repositoriesSten Hiedel
 
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsI.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsNicolas Fränkel
 
Love and Loss: A Symfony Security Play
Love and Loss: A Symfony Security PlayLove and Loss: A Symfony Security Play
Love and Loss: A Symfony Security PlayKris Wallsmith
 
Command Bus To Awesome Town
Command Bus To Awesome TownCommand Bus To Awesome Town
Command Bus To Awesome TownRoss Tuck
 

Andere mochten auch (20)

The quest for global design principles (SymfonyLive Berlin 2015)
The quest for global design principles (SymfonyLive Berlin 2015)The quest for global design principles (SymfonyLive Berlin 2015)
The quest for global design principles (SymfonyLive Berlin 2015)
 
Top tips my_sql_performance
Top tips my_sql_performanceTop tips my_sql_performance
Top tips my_sql_performance
 
Mocking Demystified
Mocking DemystifiedMocking Demystified
Mocking Demystified
 
Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015Understanding Craftsmanship SwanseaCon2015
Understanding Craftsmanship SwanseaCon2015
 
Why elasticsearch rocks!
Why elasticsearch rocks!Why elasticsearch rocks!
Why elasticsearch rocks!
 
Si le tdd est mort alors pratiquons une autopsie mix-it 2015
Si le tdd est mort alors pratiquons une autopsie mix-it 2015Si le tdd est mort alors pratiquons une autopsie mix-it 2015
Si le tdd est mort alors pratiquons une autopsie mix-it 2015
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQL
 
TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016
 
Performance serveur et apache
Performance serveur et apachePerformance serveur et apache
Performance serveur et apache
 
Behat 3.0 meetup (March)
Behat 3.0 meetup (March)Behat 3.0 meetup (March)
Behat 3.0 meetup (March)
 
Caching on the Edge
Caching on the EdgeCaching on the Edge
Caching on the Edge
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony Components
 
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)security
 
Design how your objects talk through mocking
Design how your objects talk through mockingDesign how your objects talk through mocking
Design how your objects talk through mocking
 
Measuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionMeasuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb Edition
 
Composer in monolithic repositories
Composer in monolithic repositoriesComposer in monolithic repositories
Composer in monolithic repositories
 
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsI.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
 
Love and Loss: A Symfony Security Play
Love and Loss: A Symfony Security PlayLove and Loss: A Symfony Security Play
Love and Loss: A Symfony Security Play
 
Command Bus To Awesome Town
Command Bus To Awesome TownCommand Bus To Awesome Town
Command Bus To Awesome Town
 

Ähnlich wie BDD is about communication and understanding behavior

Event Sourcing - You are doing it wrong @ Devoxx
Event Sourcing - You are doing it wrong @ DevoxxEvent Sourcing - You are doing it wrong @ Devoxx
Event Sourcing - You are doing it wrong @ DevoxxDavid Schmitz
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentFuture Processing
 
Everyone loves autopilot money
Everyone loves autopilot moneyEveryone loves autopilot money
Everyone loves autopilot moneymego785
 
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.Andreas Klinger
 
Pitch Deck Templates for Startups
Pitch Deck Templates for StartupsPitch Deck Templates for Startups
Pitch Deck Templates for StartupsNextView Ventures
 
Startup Pitch Deck Templates - NextView Ventures
Startup Pitch Deck Templates - NextView VenturesStartup Pitch Deck Templates - NextView Ventures
Startup Pitch Deck Templates - NextView Venturespeerhack
 
Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Codemotion
 
Mvt eagles presentation
Mvt eagles presentationMvt eagles presentation
Mvt eagles presentationscabsrams
 
Mvt eagles presentation
Mvt eagles presentationMvt eagles presentation
Mvt eagles presentationscabsrams
 
Things to avoid when trading crypto
Things to avoid when trading cryptoThings to avoid when trading crypto
Things to avoid when trading cryptodiaa17
 
Random Walks, Efficient Markets & Stock Prices
Random Walks, Efficient Markets & Stock PricesRandom Walks, Efficient Markets & Stock Prices
Random Walks, Efficient Markets & Stock PricesNEO Empresarial
 
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv..."How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...TheFamily
 
Activities In School Essay. Online assignment writing service.
Activities In School Essay. Online assignment writing service.Activities In School Essay. Online assignment writing service.
Activities In School Essay. Online assignment writing service.Vanessa Perkins
 
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional Topics
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional TopicsStanford CS 007-10 (2018): Personal Finance for Engineers / Additional Topics
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional TopicsAdam Nash
 
Amazon: Innovator or Destroyer? (Or Both?)
Amazon: Innovator or Destroyer? (Or Both?)Amazon: Innovator or Destroyer? (Or Both?)
Amazon: Innovator or Destroyer? (Or Both?)Callahan
 
Everything You Know About Investing in Toronto is WRONG!.pdf
Everything You Know About Investing in Toronto is WRONG!.pdfEverything You Know About Investing in Toronto is WRONG!.pdf
Everything You Know About Investing in Toronto is WRONG!.pdfVolition Properties
 
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...Distilled
 

Ähnlich wie BDD is about communication and understanding behavior (20)

Bdd training-v1
Bdd training-v1Bdd training-v1
Bdd training-v1
 
Event Sourcing - You are doing it wrong @ Devoxx
Event Sourcing - You are doing it wrong @ DevoxxEvent Sourcing - You are doing it wrong @ Devoxx
Event Sourcing - You are doing it wrong @ Devoxx
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
The Real Automated Stock Trader
The Real Automated Stock TraderThe Real Automated Stock Trader
The Real Automated Stock Trader
 
Everyone loves autopilot money
Everyone loves autopilot moneyEveryone loves autopilot money
Everyone loves autopilot money
 
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.
 
Pitch Deck Templates for Startups
Pitch Deck Templates for StartupsPitch Deck Templates for Startups
Pitch Deck Templates for Startups
 
Startup Pitch Deck Templates - NextView Ventures
Startup Pitch Deck Templates - NextView VenturesStartup Pitch Deck Templates - NextView Ventures
Startup Pitch Deck Templates - NextView Ventures
 
Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016Coding Culture - Sven Peters - Codemotion Milan 2016
Coding Culture - Sven Peters - Codemotion Milan 2016
 
Mvt eagles presentation
Mvt eagles presentationMvt eagles presentation
Mvt eagles presentation
 
Mvt eagles presentation
Mvt eagles presentationMvt eagles presentation
Mvt eagles presentation
 
Things to avoid when trading crypto
Things to avoid when trading cryptoThings to avoid when trading crypto
Things to avoid when trading crypto
 
Dividend Payout Ratio Secrets
Dividend Payout Ratio SecretsDividend Payout Ratio Secrets
Dividend Payout Ratio Secrets
 
Random Walks, Efficient Markets & Stock Prices
Random Walks, Efficient Markets & Stock PricesRandom Walks, Efficient Markets & Stock Prices
Random Walks, Efficient Markets & Stock Prices
 
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv..."How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...
"How to build an equity strategy when you are fundraising?" by Guillaume-Oliv...
 
Activities In School Essay. Online assignment writing service.
Activities In School Essay. Online assignment writing service.Activities In School Essay. Online assignment writing service.
Activities In School Essay. Online assignment writing service.
 
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional Topics
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional TopicsStanford CS 007-10 (2018): Personal Finance for Engineers / Additional Topics
Stanford CS 007-10 (2018): Personal Finance for Engineers / Additional Topics
 
Amazon: Innovator or Destroyer? (Or Both?)
Amazon: Innovator or Destroyer? (Or Both?)Amazon: Innovator or Destroyer? (Or Both?)
Amazon: Innovator or Destroyer? (Or Both?)
 
Everything You Know About Investing in Toronto is WRONG!.pdf
Everything You Know About Investing in Toronto is WRONG!.pdfEverything You Know About Investing in Toronto is WRONG!.pdf
Everything You Know About Investing in Toronto is WRONG!.pdf
 
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...
SearchLove Boston 2015 | Ian Lurie, 'Why the Hell Not? SEO Leadership Through...
 

Mehr von Arnauld Loyer

Brown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marBrown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marArnauld Loyer
 
Bdd training v5.2.0 - public
Bdd training   v5.2.0 - publicBdd training   v5.2.0 - public
Bdd training v5.2.0 - publicArnauld Loyer
 
Event storming Notes
Event storming NotesEvent storming Notes
Event storming NotesArnauld Loyer
 
BDD - Writing better scenario
BDD - Writing better scenarioBDD - Writing better scenario
BDD - Writing better scenarioArnauld Loyer
 
Nos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentNos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentArnauld Loyer
 
Behavior Driven Development // Brown Bag Lunch v1.0.0
Behavior Driven Development // Brown Bag Lunch  v1.0.0Behavior Driven Development // Brown Bag Lunch  v1.0.0
Behavior Driven Development // Brown Bag Lunch v1.0.0Arnauld Loyer
 
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Arnauld Loyer
 
Confiance&bdd softshake2013
Confiance&bdd softshake2013Confiance&bdd softshake2013
Confiance&bdd softshake2013Arnauld Loyer
 

Mehr von Arnauld Loyer (10)

Brown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marBrown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/mar
 
Bdd training v5.2.0 - public
Bdd training   v5.2.0 - publicBdd training   v5.2.0 - public
Bdd training v5.2.0 - public
 
Event storming Notes
Event storming NotesEvent storming Notes
Event storming Notes
 
BDD training v5.0.1
BDD training  v5.0.1BDD training  v5.0.1
BDD training v5.0.1
 
BDD - Writing better scenario
BDD - Writing better scenarioBDD - Writing better scenario
BDD - Writing better scenario
 
Nos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentNos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven Development
 
Behavior Driven Development // Brown Bag Lunch v1.0.0
Behavior Driven Development // Brown Bag Lunch  v1.0.0Behavior Driven Development // Brown Bag Lunch  v1.0.0
Behavior Driven Development // Brown Bag Lunch v1.0.0
 
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
 
Confiance&bdd softshake2013
Confiance&bdd softshake2013Confiance&bdd softshake2013
Confiance&bdd softshake2013
 
Bdd training - v3
Bdd training - v3Bdd training - v3
Bdd training - v3
 

Kürzlich hochgeladen

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Kürzlich hochgeladen (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

BDD is about communication and understanding behavior

  • 1. BA CL’ BDDCE QUE C’est OU Ce QUE C’est pas… Arnauld Loyer @aloyer 2014 du
  • 4. It’s not about Silo!Or Acceptance Criteria It’s about Sharing and Understanding @aloyer
  • 5. It’s about Driven Development! @aloyer
  • 6. Qu'est ce qui se passe? Modèle Mental @aloyer @aloyer @aloyer
  • 7. Qu'est ce qui se passe? Modèle Mental Ce qui est expliqué Ce qui n'est pas retranscrit Modèle Mental @aloyer @aloyer @aloyer
  • 8. Qu'est ce qui se passe? Modèle Mental Ce qui est expliqué Ce qui n'est pas retranscrit Modèle Mental Ce que l'autre comprend @aloyer @aloyer @aloyer
  • 9. Qu'est ce qui se passe? Ce qui est spécifié @aloyer @aloyer @aloyer
  • 10. Qu'est ce qui se passe? Ce qui va être testé @aloyer @aloyer @aloyer @aloyer
  • 11. Qu'est ce qui se passe? Ce qui va être testé Ce qui est réalisé @aloyer @aloyer @aloyer @aloyer
  • 12. Qu'est ce qui se passe? @aloyer @aloyer @aloyer
  • 13. Qu'est ce qui se passe? @aloyer @aloyer @aloyer
  • 14. Qu'est ce qui se passe? Correspond à l'idée initiale Ce qui a été réalisé @aloyer @aloyer
  • 15. Qu'est ce qui se passe? Correspond à l'idée initiale Ce qui a été réalisé NNNAaannnnnn vs @aloyer @aloyer
  • 16. "is this a bug or is this not a bug” a bug? a feature? an enhancement? a beature? @aloyer
  • 20. 3 steps 3 model 3 interpretations @aloyer
  • 21. 3 visions 1 model 1 goal @aloyer
  • 25. BDD is about conversation @aloyer @aloyer
  • 29. Why? Goal? Business Value? In order to <achieve the vision> Feature: ... As a <stakeholder> I want <value> Intention As a <role> I want <goal> So that <value> User focused What? How! @aloyer @aloyer
  • 30. No Narrative No Business Value Unnecessary Feature ! @aloyer
  • 32. In order to... Feature: ... As a... I want to... Scenario: ... Given <a context> When <an event happens> Then <an outcome should occur> BDD uses examples to illustrate behavior @aloyer @aloyer
  • 33. Why do YOU like should? It encourages debate, and constant Questioning of the premise of the application you are developing. Dan North, March 2005 @aloyer
  • 34. Feature: Account Holder withdraws cash from an ATM ! In the following scenario, ATM will stands for Automatic Teller Machine in other word a “Cash machine”. ! In order to get money at any time, even when the bank is closed As an Account Holder I want to withdraw cash from an ATM ! Scenario: Account has sufficient funds Given the account balance is 100€ When the Account Holder requests 20€ Then the ATM should dispense 20€ And the account balance should be 80€ And the card should be returned @aloyer
  • 35. Scenario: Account has insufficient funds Given the account balance is 10€ And the card is valid And the machine contains enough money When the Account Holder requests 30€ Then the ATM should not dispense any money And the ATM should say there are insufficient funds And the account balance should still be 10€ And the card should be returned @aloyer
  • 36. Scenario: Account has insufficient funds Given the account balance is 10€ And the card is valid And the machine contains enough money When the Account Holder requests 30€ Then the ATM should not dispense any money And the ATM should say there are insufficient funds And the account balance should still be 10€ And the card should be returned FOCUS On the BEHAVIOR DESCRIBED! @aloyer
  • 38. Feature: Interpolate ! In order to interpolate values As an Trader I want to interpolate values in a range of Market data Why this feature ? @aloyer
  • 39. Feature: Linear Interpolation In order to fill the gaps and provide a value for any maturity As a trader responsible for market-making I want to interpolate linearly values within a range of points And I want a flat extrapolation outside of the range of points Why this feature ? @aloyer
  • 40. Scenario: Change the negotiation price from positive to negative => soulte cashflow appears and premium cashflow is modified ! Given an FUNKY_EXOTIC And deal way is sell And deal nature is TOMATO And trade value date is 2012/07/01 And nominal is 100 JPY And negotiation price is 0.20 JPY When I validate the deal Then there are 1 Price cashflows And there are 0 fee cashflows When I change the negotiation price to -0.3 JPY And I validate the deal Then there are 1 Price cashflows And there are 1 fee cashflows And the trade cashflow's payment date is 2012/07/01 And the trade cashflow's way is receive And the trade cashflow's amount is 30 JPY And the fee cashflow's payment date is 2012/07/01 And the fee cashflow's way is give And the fee cashflow's amount is 60 JPY What about this scenario @aloyer
  • 41. What about this scenario d = new Deal(); d.SetWay(Sell); d.SetNature(Tomato); d.SetValueDate(new Date(...)); d.SetNominal(100, JPY); d.SetNegotiationPrice(0.20, JPY); cf = d.GetCashFlows(); AssertThat(IsEqual(...); ... Scenario: Change the negotiation price from positive to negative => soulte cashflow appears and premium cashflow is modified ! Given an FUNKY_EXOTIC And deal way is sell And deal nature is TOMATO And trade value date is 2012/07/01 And nominal is 100 JPY And negotiation price is 0.20 JPY When I validate the deal Then there are 1 Price cashflows And there are 0 fee cashflows When I change the negotiation price to -0.3 JPY And I validate the deal Then there are 1 Price cashflows And there are 1 fee cashflows And the trade cashflow's payment date is 2012/07/01 And the trade cashflow's way is receive And the trade cashflow's amount is 30 JPY And the fee cashflow's payment date is 2012/07/01 And the fee cashflow's way is give And the fee cashflow's amount is 60 JPY @aloyer
  • 42. SCEnARIO: Fee and Price cashflows when the negotiation price is set to a negative value ! Given a sell for a nominal 100 JPY on FUNKY_EXOTIC TOMATO negotiation price 0.20 JPY traded on 2012/07/01 When the middle officer validates the deal Then the trade has one Price cashflow and no Fee cashflow When the middle officer changes the negotiation price to -0.3 JPY And the middle officer validates the deal Then the trade has the following cashflows: What about this scenario Communicate With the Business People !!! FlowType Price Fee Way Receive Give Amount 30 60 Currency JPY JPY Payment Date 2012/07/01 2012/07/01 Remarks 100*abs(-0.3) 100*2*abs(-0.3) @aloyer
  • 45. @aloyer Domain Driven Design - Eric Evans @aloyer
  • 46. In order to... Feature: ... As a... I want to... Scenario: ... Given <a context> When <an event happens> Then <an outcome should occur> Examples help discover things early @aloyer @aloyer
  • 47. In order to... Feature: ... As a... I want to... Scenario: ... Given <a context> When <an event happens> Then <an outcome should occur> One may discover that one doesn't know but others do! @aloyer @aloyer
  • 48. WHAT About Automation !?! The Green Thing ? @aloyer
  • 49. GLUECODE BDDFRAMEWORK SCENARIO APPLICATION "End to End" UI FEST, Selenium, Fluentlenium, HtmlUnit, Watir... @aloyer
  • 55. Scenario: Account has sufficient funds! Given the account balance is 100€! When the Account Holder requests 20€ Then the ATM should dispense 20€! And the account balance should be 80€! And the card should be returned SCENARIO GLUECODE BDDFRAMEWORK APPLICATION @aloyer
  • 56. Scenario: Account has sufficient funds! Given the account balance is 100€! When the Account Holder requests 20€ Then the ATM should dispense 20€! And the account balance should be 80€! And the card should be returned SCENARIO GLUECODE BDDFRAMEWORK APPLICATION @aloyer
  • 57. Scenario: Account has sufficient funds! Given the account balance is 100€! When the Account Holder requests 20€ Then the ATM should dispense 20€! And the account balance should be 80€! And the card should be returned SCENARIO @Given("^the account balance is (d+)€$") public void defineAccountBalanceInEuro(BigDecimal balance) { throw new PendingException("Implements me!"); } ! @When("^the Account Holder request (d+)€$") public void withdrawInEuro (BigDecimal amount) { throw new PendingException("Implements me!"); } ! @Then("^the ATM should dispense (d+)€$") public void assertMoneyDispensedInEuro (BigDecimal amount) { throw new PendingException("Implements me!"); } ! ! ! @Then("^the account balance should be (d+)€$") public void assertBalanceInEuro(BigDecimal amount) { throw new PendingException("Implements me!"); } ! GLUE CODE APPLICATION BDDFRAMEWORK @aloyer
  • 58. Scenario: Account has sufficient funds! Given the account balance is 100€! When the Account Holder requests 20€ Then the ATM should dispense 20€! And the account balance should be 80€! And the card should be returned SCENARIO @Given("^the account balance is (d+)€$") public void defineAccountBalanceInEuro(BigDecimal balance) { account().setBalance(euro(balance)); } ! @When("^the Account Holder request (d+)€$") public void withdrawInEuro (BigDecimal amount) { atm().withdraw(account(), euro(amount)); } ! @Then("^the ATM should dispense (d+)€$") public void assertMoneyDispensedInEuro (BigDecimal amount) { TransactionLog txLog = atm().transactionLog();! Money dispensed = txLog.lastAmountDispensed();! assertThat(dispensed).isEqualTo(euro(amount)); }! ! @Then("^the account balance should be (d+)€$") public void assertBalanceInEuro(BigDecimal amount) { Money actualBalance = account().balance();! assertThat(actualBalance).isEqualTo(euro(amount)); } GLUE CODE APPLICATION BDDFRAMEWORK @aloyer
  • 59. And that’s all Folks… for the Green Thing! but remember, you can automate from unit level to end-to-end level @aloyer
  • 60. THE Point If only one thing must remain @aloyer
  • 61. BDD = Shared understanding by discussing Examples @aloyer
  • 62. BDD = Shared understanding by discussing Examples Three AmiGOS @aloyer
  • 63. BDD = Shared understanding by discussing Examples Scenario Three AmiGOS @aloyer @aloyer