Confiance & BDD - Présentation faite à Softshake sur les origines de la confiance et comment le Behavior Driven Development (BDD) contribue à restaurer ou instaurer la confiance entre les développeurs, le métier et les testeurs.
Rappellez-vous cette petite fille, la bouche pleine de chocolat qui dit "Mon papa il me dit toujours on ne doit pas manger de mousse au chocolat avant de manger... sinon tu trompes la confiance que tes parents ils ont mis à l'interieur de toi"
Cela vous rappelle quelque chose? Votre relation avec les développeurs, avec votre client ou encore avec vos testeurs?
Vous avez été trahis, la confiance s'est érodée, vous êtes au bord de la rupture, vos yeux sont cernés? Ne vous inquiétez pas il est encore temps de réagir. Que vous soyez testeurs, Business Analysts, clients, developpeurs, il y a toujours une issue. Nous allons voir comment en travaillant ensemble, vous allez pouvoir restaurez la confiance et la qualité de vos développements.
Avec "Adopte BDD", tous ensemble vous allez pouvoir écrire une nouvelle histoire, vous serez les propres acteurs de vos scénarios, l'automatisation n'aura plus de secret pour vous. Quelques rondelles de concombre, et fini les yeux gonflés, les cernes et les traits tirés. Vous serez enfin détendu.
Une présentation où il est question de mousse au chocolat, de confiance et de concombre.
9. « un état psychologique se
caractérisant par l'intention d'accepter
la vulnérabilité sur la base de
croyances optimistes sur les intentions
(ou le comportement) d'autrui »
dimanche 3 novembre 13
10. "Mon papa il me dit toujours:
on ne doit pas manger de mousse au chocolat avant de manger...
sinon tu trompes la confiance que tes parents ils ont mis à l'interieur de toi"
http://www.ina.fr/video/PUB1059599066
dimanche 3 novembre 13
14. Project Challenged Factors
1. Lack of User Input
2. Incomplete Requirements & Specifications
3. Changing Requirements & Specifications
4. Lack of Executive Support
5. Technology Incompetence
6. Lack of Resources
7. Unrealistic Expectations
8. Unclear Objectives
9. Unrealistic Time Frames
10. New Technology
12.8%
12.3%
11.8%
7.5%
7.0%
6.4%
5.9%
5.3%
4.3%
3.7%
Project Impaired Factors
1. Incomplete Requirements
2. Lack of User Involvement
3. Lack of Resources
4. Unrealistic Expectations
5. Lack of Executive Support
6. Changing Requirements & Specifications
7. Lack of Planning
8. Didn't Need It Any Longer
9. Lack of IT Management
10. Technology Illiteracy
% of
13.1%
12.4%
10.6%
9.9%
9.3%
8.7%
8.1%
7.5%
6.2%
4.3%
Chaos Report
http://blog.standishgroup.com/
dimanche 3 novembre 13
15. The Bull Survey (1998)
All the managers interviewed had previously taken the lead in integrating large systems
within organizations in the Times Top 100.
Project Evaluation Criteria
The main IT project failure criteria identified by the IT and project managers were:
* missed deadlines (75%)
* exceeded budget (55%)
* poor communications (40%)
* inability to meet project requirements (37%).
http://www.it-cortex.com/Stat_Failure_Cause.htm
dimanche 3 novembre 13
16. The Bull Survey (1998)
2005 managers
All the Survey: interviewed had previously taken the lead in integrating large systems
The Top
Business Im
Challe 100.
within organizations n the Times Topnges Fa
proveme in
cing Busi
t Architect
Business An
’s research
ness Ana
alyst World
survey of B
l
2005 in Tor
the Busines
usiness Ana ysts
Project Evaluation Criteria onto, Cana
s Functions
lysts attend
da, identifie
’ and ‘Busin
challenges
ing Project
d that ‘Lack
ess Require
facing their
World/
of Clarity i
ments Not
organizatio
n th
W ll-Defin managers were: e Scope
ns in mana by
The main IT project failure criteria identifiedin the IT andeproject ed”
of
g g busine
are the top
-- http://ww
ss requirem
two
* missed deadlinesar
w.bia.ca/ (75%)
ents.
ticles/TheT
opChalleng
* exceeded budget (55%)
esFacingBu
sinessAnaly
* poor communications (40%)
sts.htm
* inability to meet project requirements (37%).
http://www.it-cortex.com/Stat_Failure_Cause.htm
dimanche 3 novembre 13
17. il
s Fa
t
ojec ce
4
nd IT
Pr
ss a
an
IT
lide=
e
n
s
busin
818&
Why of Gover
n
?c=81
cs
twee
ck
x
1. La rnal Politi cation be
w.asp
o
uni
nte
ws/sh
2. I
comm ectations (1998) /slidesho
r
m
p
. Poo TheeBull Survey
3
ge.co
ar x
d
e
Uncl2
nesse
4.
0the Surw.itbusi
All 05://ww vey: interviewed had previously taken the lead in integrating large systems
managers Th
e
pess
Busitn organizations in the p Challe 100.
ht
Improveme To Times Topnges F
within
acing Bu
nt Architec
Business An
siness An
t’s research
alyst World
al
survey of B
2005 in Tor
the Busines
usiness Ana ysts
Project Evaluation Criteria onto, Cana
s Functions
lysts attend
da, identifie
’ and ‘Busin
challenges
ing Project
d that ‘Lack
ess Require
facing their
World/
of Clarity i
ments Not
organizatio
n th
W ll-Defin managers were: e Scope
ns in mana by
The main IT project failure criteria identifiedin the IT andeproject ed”
of
g g busine
are the top
-- http://ww
ss requirem
two
* missed deadlinesar
w.bia.ca/ (75%)
ents.
ticles/TheT
opChalleng
* exceeded budget (55%)
esFacingBu
sinessAnaly
* poor communications (40%)
sts.htm
* inability to meet project requirements (37%).
http://www.it-cortex.com/Stat_Failure_Cause.htm
dimanche 3 novembre 13
18. il
s Fa
t
ojec ce
4
nd IT
Pr
ss a
an
IT
lide=
e
n
s
busin
818&
Why of Gover
n
es
?c=81
cs
twee
ck
liti
be
spx
le mistak
. La
o
b
.a
n
1
preventa
rnal P municatio
show
ly
e
s/
2. Int r com
on entire
ns
show
r
e
o The Bulltatio
each yea
ec Survey (1998) om/slid
rs
3. Po lear exp
ge.c
s of dolla
d
on
Unc 2
nesseWe waste billi
s
4.
0the Surw.iare siails tbu interviewed had previously taken theolead re-integrating large systems
05 managers F
wa in fail
ft
All ://wwtvey: Th
Sof w
re/why-s
e To
BuWpess Im
t h
hsitn yorganizations in the p ChpTopn/softwa
a in
within 5) provemen
Times ule g ges Fa
/ctom lt 100.
cing Busi
t .org
Busi200s An
( nes
ness Ana
m.ieeeArchi ect’s research
actr
survey of B
l
//spelystuWorld 2005 in
the httsi:nes
Bu p Evaluation Criteriaaorors:o
usiness Ana ysts
T
Project s Function
lys
on f ct nt ,cCgoada, identi
challenges
c an m si s r R an ls
fied that ‘La ts attending Project W
st s’omd ‘Buteneps oje qt
a t ng tho
e ur
nfg cihe m eiruorgainiula d
Amo IT project failureccriteria ed resuirements Not Weproject k of Clarity in the
o by
nart zations identified ces the IT and ll-D c managers were: Sc orld/
The mainrealistic or
ed in managinents
o
e
e
-- http*//Un
ates of n requirem g business requ fined” are the top tw pe of
: ww .b a. s(75%)
* missed cwuriateaearim
deadlines t
o
irements.
c / ticles/ stem
y heTo
Ina c
rs
*
se
* exceededlbudget ned Te propech'allstngus
C t s e at es
defi (55%) h
, a nd u
j
FacingBusin developers
* Bad y rting of t
e,
* poor communications (40%)
tomers ssAnalysts.htm
or repo isks
s
* Po
d r projectn among cu
* inability anage
to meet
requirements (37%).
Unm
catio
i
*
ommun chnology
c
ity
* Poor
complex
ture te
a
t's
http://www.it-cortex.com/Stat_Failure_Cause.htm
se of imm andle the projec
*U
h
s
ability to pment practice
* In
py develo anagement
* Slop
m
r project litics
* Poo
po
eholder essures
* Stak
ercial pr
* Comm
dimanche 3 novembre 13
19. l
Seven cts Fai IT Projects Fail - February 2012
Reasons
e
4
nd IT
Proj nance
ss a
IT
lide=
e
s
818&
Why o1.GoverProject Planning en busin
es
?c=81
twe and Direction
ck f Poortics
e
li
spx
le mistak
. La 2.l InsufficientbCommunication
o
b
.a
n
1
preventa
rna P municatio
show
ly
e
s/
2. Int r3.oIneffectivetions
on entire
m
show
r
c
o The Bullta Management com/slide
each yea
ec Survey (1998)
ll
3. Po 4.aFailure to Align With. Constituentsf andars
r exp
dge ste billions o do Stakeholders
e
cl
n sse
s
siaies - We wa
4. Un 2005
b
tr u interviewed had previously taken theolead re-integrating large systems
.iaye F l
wa in fail
ft
All the/Surtwe : Th
managers
Sof w
re/why-s
:y/ww v
e To
BuWpess Im
t h organizations in the p Chaulen/softwa
hsitn http://www.ibmsystemsmag.com/power/Systems-Management/Workload-Management/
in
within 5) provemen
Times Top g ges Fa
/ctomp lt 100.
cing Busi
t .org
Busi200s An
( nes
ness Ana project_pitfalls/?page=2
m.ieeeArchi ect’s research
actr
elystuWorld 20
p
survey of B
l
the httsi:n/ss
05 in Torors:
Bu p / e s Fu
usiness Ana ysts
Project Evaluation Criteriaact nto, Canals
nctions’ommon f
lyst
challenges
st c and ‘Buteneps oject go da, identified that ‘La s attending Project W
si
a t ng tho
c
orld/
nfg cihe m eiruorgainiula d s r Reesuirements No
Amo IT project failureccriteria ed r q ources the IT t Weproject k of Clarity in the
nart zations identified by
The mainrealistic or
and ll-Defined”
managers were: Scope of
d in m a g
are the top
Un
es of nee quaneginentsiness re
-- http*//ww
ir m bus
timat
:
es(75%)
two
quirements
* missed cwuriatea/ar
deadlines
re
.
s
Ina c .b a.c fintecles/TheTo
i d ystem
*
s e at
nd user
pech'allstngus
e
* exceededlbudget (55%) e proj C t
a
esFacingBu
Bad y d ting of th
lopers,
*
s ne deve
* poor communications (40%)
eirs,ssAnalysts.htm
por
e
custom
* Poor r ed risks
* inability anag
to meet projectn among
requirements (37%).
Unm
catio
i
*
ommun chnology
c
ity
* Poor
complex
ture te
a
t's
http://www.it-cortex.com/Stat_Failure_Cause.htm
se of imm andle the projec
*U
h
s
ability to pment practice
* In
py develo anagement
* Slop
m
r project litics
* Poo
po
eholder essures
* Stak
ercial pr
* Comm
dimanche 3 novembre 13
20. l
Seven cts Fai IT Projects Fail - February 2012
Reasons
e
4
nd IT
Proj nance
ss a
IT
lide=
e
s
818&
Why o1.GoverProject Planning en busin
es
?c=81
twe and Direction
ck f Poortics
e
li
spx
le mistak
. La 2.l InsufficientbCommunication
o
b
.a
n
1
preventa
rna P municatio
show
ly
e
s/
2. Int r3.oIneffectivetions
on entire
m
show
r
c
o The Bullta Management com/slide
each yea
ec Survey (1998)
ll
3. Po 4.aFailure to Align With. Constituentsf andars
r exp
dge ste billions o do Stakeholders
e
cl
n sse
s
siaies - We wa
4. Un 2005
b
tr u interviewed had previously taken theolead re-integrating large systems
.iaye F l
wa in fail
ft
All the/Surtwe : Th
managers
Sof w
re/why-s
:y/ww v
e To
BuWpess Im
t h organizations in the p Chaulen/softwa
hsitn http://www.ibmsystemsmag.com/power/Systems-Management/Workload-Management/
in
within 5) provemen
Times Top g ges Fa
/ctomp lt 100.
cing Busi
t .org
Busi200s An
( nes
ness Ana project_pitfalls/?page=2
m.ieeeArchi ect’s research
actr
elystuWorld 20
p
survey of B
l
the httsi:n/ss
05 in Torors:
Bu p / e s Fu
usiness Ana ysts
Project Evaluation Criteriaact nt
The Most CommonnFactmos for tho, Canada
nctio s’om or n f
lys
challenges
e qt go s , de tifift t ar ‘ a ts attending rojoject
st c and ‘Buteneps ojecfailulre iofnSoedwhateLDevelopmentPPrect W
si
a t ng tho
c
orld/
nfg cihe m eiruorgainiula d s r Reesuirements No
Amo IT project failureccriteria ed r ources the IT t Weproject k of Clarity in the
nart zations identified by
The of n us stimer
and ll-Defined”
managers were: Scope of
1. Lack mainrealitoc or or User eed in lvanaginents
are the top
UC
es of n Invo memm gtbusiness re
en
-- http*//ww
timat
: ar gouriate es(75%)
quire
two
quirements
* missed deadlines d
2. Uncle Inacw.als.ca/artobjectivm re
c b a an icles/T te es
.
s
ys eTo
*
d
fineSe h propech'allstngus
s e at
nd user
e
* exceededlbudget t
a
3. Poor Requiremen(55%) he
j Ct
esFacingBu
Bad y d ting of t
lopers,
t
*
s ne deve
* poor so r ces
communications (40%)
4. Lack of Reoourrepor
eirs,ssAnalysts.htm
custom
*P
s
n
* inability to municproject requirements (37%).
5. Failure to managed riskateationacmas g
com meet nic and a t o a team
* Un
u
r comm e technology
ity
* Poo
complex
tur
a
t's
http://www.it-cortex.com/Stat_Failure_Cause.htm
se of imm andle the projec
*U
h
s
ability to pment practice Volume 1, No. 11, January
* In
2013 ISSN – 2278-1080
n
py develo anagemeIntternational Jour
* Slop
nal of Computer Science & Applications
t m The
jecur
ro jo nalocs mpu
htPo://r p w.
terscience.com/2013Issue/Jan13/V1No11Jan
* tp o ww er politi fco
13P044.pdf
takehold pressures
*S
l
mmercia
* Co
dimanche 3 novembre 13
21. Q u'es t ce qui se
passe?
Modèle
Mental
Ce qui est expliqué
dimanche 3 novembre 13
22. Q u'es t ce qui se
passe?
Modèle
Mental
Ce qui est expliqué
Ce qui
n'est pas
retranscrit
dimanche 3 novembre 13
23. Q u'es t ce qui se
passe?
Modèle
Mental
Ce qui est expliqué
Ce que l'autre
Ce qui
comprend
n'est pas
retranscrit
dimanche 3 novembre 13
Modèle
Mental
24. Q u'es t ce qui se
passe?
Ce qui est
spécifié
dimanche 3 novembre 13
25. Q u'es t ce qui se
passe?
Ce qui va
être testé
dimanche 3 novembre 13
26. Q u'es t ce qui se
passe?
Ce qui va
être testé
Ce qui est
réalisé
dimanche 3 novembre 13
27. Q u'es t ce qui se
passe?
dimanche 3 novembre 13
28. Q u'es t ce qui se
passe?
dimanche 3 novembre 13
29. Q u'es t ce qui se
passe?
dimanche 3 novembre 13
30. Q u'es t ce qui se
passe?
dimanche 3 novembre 13
31. Q u'es t ce qui se
passe?
dimanche 3 novembre 13
32. Q u'es t ce qui se
passe?
Ce qui a été réalisé
Correspond à l'idée
initiale
dimanche 3 novembre 13
33. Q u'es t ce qui se
passe?
aannnnnn
NNNA
Ce qui a été réalisé
vs
Correspond à l'idée
initiale
dimanche 3 novembre 13
46. Feature: ...
Intention ourquoi?
P
In order to <achieve the vision>
l but?
As a <stakeholder>
ns que
Da
I want <value>
Quelle valeur?
dimanche 3 novembre 13
47. Feature: ...
Intention ourquoi?
P
In order to <achieve the vision>
l but?
As a <stakeholder>
ns que
Da
I want <value>
Quelle valeur?
As a <role>
I want <goal>
So that <value>
focused
User
dimanche 3 novembre 13
51. Feature: ...
In order to...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event occurs>
Then <an outcome>
dimanche 3 novembre 13
52. 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
dimanche 3 novembre 13
53. Feature: ATM is monitored to keep track of remaining bills
In the following scenario, ATM will stands for
Automatic Teller Machine in other word a “Cash machine”.
In order to make sure customer always use our machine
As an ATM technician
I want to be informed whenever the bills runs out
Scenario: Email sent on the last 10€ bill
Given the ATM has following bills
| value
| quantity |
| 10
|
1
|
| 20
|
200
|
When the an Account Holder requests 30€
Then an email should be sent indicating 10€ bills run out
dimanche 3 novembre 13
54. Feature: Market Share Analysis control
In order to detect abuse of Market Share Analysis and
price variation imposed by the financial regulation
As an compliance officer
I want to control and identify products on which X has
been a significant trading participant compared to the daily
market volume and where the intraday price variation and/or
closing price variation has also been significant.
dimanche 3 novembre 13
55. Feature: ...
In order to...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event occurs>
Then <an outcome>
dimanche 3 novembre 13
56. Feature: ...
In order to...
As a...
I want to...
Scenario: ...
Given <a context>
When <an event occurs>
Then <an outcome>
dimanche 3 novembre 13
86. dimanche 3 novembre 13
APPLICATION
GLUE CODE
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
BDD FRAMEWORK
SCENARIO
87. dimanche 3 novembre 13
APPLICATION
GLUE CODE
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
BDD FRAMEWORK
SCENARIO
88. GLUE CODE
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
@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!");
}
dimanche 3 novembre 13
APPLICATION
SCENARIO
BDD FRAMEWORK
@Given("^the account balance is (d+)€$")
public void defineAccountBalanceInEuro(BigDecimal
balance) {
throw new PendingException("Implements me!");
}
89. GLUE CODE
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
@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));
}
dimanche 3 novembre 13
APPLICATION
SCENARIO
BDD FRAMEWORK
@Given("^the account balance is (d+)€$")
public void defineAccountBalanceInEuro(BigDecimal
balance) {
account().setBalance(euro(balance));
}
90. adopte BDD
* des spécifications à caliner
dimanche 3 novembre 13