Confiance&bdd softshake2013

583 views
527 views

Published on

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.

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
583
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Confiance&bdd softshake2013

  1. 1. vous gagne! ontagne, ça La m se e ianc conf @aloyer dimanche 3 novembre 13
  2. 2. nauld Loyer Ar @aloyer dimanche 3 novembre 13 Authentic Developer since 2000! ftsman re Cra Softwa an boy BDD f
  3. 3. On est là! dimanche 3 novembre 13
  4. 4. On est là! dimanche 3 novembre 13
  5. 5. POUR VOUS C'EST QUOI LA CONFIANCE ? dimanche 3 novembre 13
  6. 6. Origine Biologique ⚛ Une Hormone O CYTOCINE GENEVE http://bit.ly/GTyPl5 http://bit.ly/19VQ3L4 dimanche 3 novembre 13
  7. 7. Origine Spirituelle ☯ Une Croyance dimanche 3 novembre 13
  8. 8. Origine Rationnelle ⚖ Un phénomène cognitif dimanche 3 novembre 13
  9. 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. 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
  11. 11. http://www.ina.fr/video/PUB999936129 dimanche 3 novembre 13
  12. 12. Aie confiance! dimanche 3 novembre 13
  13. 13. Chaos Report http://blog.standishgroup.com/ dimanche 3 novembre 13
  14. 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. 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. 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. 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. 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. 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. 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. 21. Q u'es t ce qui se passe? Modèle Mental Ce qui est expliqué dimanche 3 novembre 13
  22. 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. 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. 24. Q u'es t ce qui se passe? Ce qui est spécifié dimanche 3 novembre 13
  25. 25. Q u'es t ce qui se passe? Ce qui va être testé dimanche 3 novembre 13
  26. 26. Q u'es t ce qui se passe? Ce qui va être testé Ce qui est réalisé dimanche 3 novembre 13
  27. 27. Q u'es t ce qui se passe? dimanche 3 novembre 13
  28. 28. Q u'es t ce qui se passe? dimanche 3 novembre 13
  29. 29. Q u'es t ce qui se passe? dimanche 3 novembre 13
  30. 30. Q u'es t ce qui se passe? dimanche 3 novembre 13
  31. 31. Q u'es t ce qui se passe? dimanche 3 novembre 13
  32. 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. 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
  34. 34. E qu ipe dév de elop pem ent de dimanche 3 novembre 13
  35. 35. 3 étapes 3 modèles 3 interprétations dimanche 3 novembre 13
  36. 36. 3 étapes 3 modèles 3 interprétations dimanche 3 novembre 13
  37. 37. 3 visions 1 modèle 1 objectif dimanche 3 novembre 13
  38. 38. dimanche 3 novembre 13
  39. 39. dimanche 3 novembre 13
  40. 40. dimanche 3 novembre 13
  41. 41. dimanche 3 novembre 13
  42. 42. dimanche 3 novembre 13
  43. 43. dimanche 3 novembre 13
  44. 44. oi ? rqu u Po l but? ns que Da Quelle valeur? dimanche 3 novembre 13
  45. 45. Intention oi ? rqu u Po l but? ns que Da Quelle valeur? dimanche 3 novembre 13
  46. 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. 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
  48. 48. dimanche 3 novembre 13
  49. 49. Feature: ... In order to... As a... I want to... dimanche 3 novembre 13
  50. 50. Feature: ... In order to... As a... I want to... dimanche 3 novembre 13
  51. 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. 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. 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. 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. 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. 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
  57. 57. dimanche 3 novembre 13
  58. 58. dimanche 3 novembre 13
  59. 59. dimanche 3 novembre 13
  60. 60. Collaboration Implication Intention Compétence Connaissance Expérience Crédibilité Compréhension Ouverture Transparence Honnêteté dimanche 3 novembre 13
  61. 61. Connaissance Compétence Collaboration Crédibilité Expérience Compréhension Implication Intention Transparence dimanche 3 novembre 13 Ouverture Honnêteté
  62. 62. Connaissance Knowledge Compétence Skills Capability Collaboration Reputation Results Performance Experience Expérience Competence Trust Implication Caring Compréhension Character Intent Intention Transparency Transparence dimanche 3 novembre 13 Crédibilité Credibility Ouverture Openness Authenticity Integrity Honnêteté Honesty Fairness
  63. 63. Une fonctionnalité dimanche 3 novembre 13
  64. 64. Une fonctionnalité Collaboration dimanche 3 novembre 13
  65. 65. Une fonctionnalité Collaboration Connaissance Partagée Compréhension dimanche 3 novembre 13
  66. 66. Une fonctionnalité Collaboration Connaissance Partagée Compréhension dimanche 3 novembre 13 BDD = A Shared Understanding by discussing Examples
  67. 67. Une fonctionnalité Collaboration Connaissance Partagée Compréhension dimanche 3 novembre 13 Des Cas Concrets d'utilisation
  68. 68. Une fonctionnalité Exécutable Automatisation dimanche 3 novembre 13 Des Cas Concrets d'utilisation
  69. 69. Une fonctionnalité Exécutable Automatisation dimanche 3 novembre 13 Des Cas Concrets d'utilisation
  70. 70. Une fonctionnalité Exécutable Automatisation dimanche 3 novembre 13 Des Cas Concrets d'utilisation
  71. 71. Spécifications exécutables aujourd'hui Tests de non Régressions demain Documentation Vivante "pour toujours" dimanche 3 novembre 13
  72. 72. C'est quoi le rapport avec ça!?! dimanche 3 novembre 13
  73. 73. C'est quoi le rapport avec ça!?! 1 dimanche 3 novembre 13 ère hypothèse
  74. 74. C'est quoi le rapport avec ça!?! 2 dimanche 3 novembre 13 nde hypothèse
  75. 75. C'est quoi le rapport avec ça!?! 2 dimanche 3 novembre 13 nde hypothèse
  76. 76. dimanche 3 novembre 13 APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO
  77. 77. UI APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO FEST, Selenium, Fluentlenium, HtmlUnit, Watir... "End to End" dimanche 3 novembre 13
  78. 78. APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO Services Web, WCF, ... "End to End" dimanche 3 novembre 13
  79. 79. Sub-Module runtime dimanche 3 novembre 13 APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO
  80. 80. Sub-Module runtime dimanche 3 novembre 13 APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO
  81. 81. APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO "Quasi-Unitaire" runtime dimanche 3 novembre 13
  82. 82. APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO "Quasi-Unitaire" runtime dimanche 3 novembre 13
  83. 83. APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO Mock, Stubs... "Quasi-Unitaire" runtime dimanche 3 novembre 13
  84. 84. dimanche 3 novembre 13 APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO
  85. 85. dimanche 3 novembre 13 APPLICATION GLUE CODE BDD FRAMEWORK SCENARIO
  86. 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. 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. 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. 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. 90. adopte BDD * des spécifications à caliner dimanche 3 novembre 13
  91. 91. dimanche 3 novembre 13
  92. 92. Des questions? http://www.flickr.com/photos/clintjcl/69383431/lightbox/ dimanche 3 novembre 13
  93. 93. Meet the Parents (2000) dimanche 3 novembre 13
  94. 94. Deviennent Exécutable tomatisation Au Deviennent Décrivent e xempilo s E r Scéna Clarifient dimanche 3 novembre 13 Vérifiée par Tests de Non Régression Living Documentation Spécification fait office de ation Collaboration munic Com Ensemble

×