SlideShare une entreprise Scribd logo
1  sur  29
Test automation
Is it really so good?
@nicoDeBoose
Nicolas De Boose
• Consultant freelance
• web
• technical Lead @ I1
• married <3
Excuse n.1
• Find your team leader
• Don’t have one? Hire!
• Do not learn on rush
Excuse n. 2
• Read amazing books
Excuse n.3
• A developer day: 5/25/70
• Compare apples with pears
• Make statistics
Excuse n. 4
Excuse n.6
• You are the « expert »
• Old developers?
Excuse n. 7
• Badly designed code
• Don’t give up!
• Start easy w/o pressure
• And …
TDD
• Test before code
• Iterations of 2 minutes
• List problems
• Fast feedback
• 1 bug = 1 test
TDD
• Coverage 100%
• Maintainable
• Decoupled
"What the research team found was that the TDD teams
produced code that was 60 to 90 percent better in terms
of defect density than non-TDD teams."
"They also discovered that TDD teams took longer to
complete their projects—15 to 35 percent longer."
"Over 3 iterations, average time taken to complete the kata
without TDD was 28m 40s. Average time with TDD was 25m
27s."
"Without TDD, on average I made 5.7 passes (delivering into
acceptance testing).
With TDD, on average I made 1.3 passes (in two attempts, they
passed first time, in one it took 2 passes.)"
Codeman ship: Code Lab experiment
TDD Conclusion
• Less bugs
• Better code/design
• 100% Coverage
• Confidence
• Documentation
• Debug time decreased
• It's personal!
Conclusion
• Discipline & Professionalism
• Test prove presence of bugs, not absence
• Don't forget « money tests »
• Prevention is better than cure (Cost of fix)
@nicoDeBoose
mechantblog.com
On recrute !

Contenu connexe

Tendances

10 things I've learned
10 things I've learned10 things I've learned
10 things I've learned
Andrei Savu
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUG
Matteo Baglini
 

Tendances (19)

JUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systemsJUG CH September 2021 - Debugging distributed systems
JUG CH September 2021 - Debugging distributed systems
 
JavaLand 2022 - Software architecture in a DevOps world
JavaLand 2022 - Software architecture in a DevOps worldJavaLand 2022 - Software architecture in a DevOps world
JavaLand 2022 - Software architecture in a DevOps world
 
Experience Report
Experience ReportExperience Report
Experience Report
 
Software Testing’s Future—According to Lee Copeland
Software Testing’s Future—According to Lee CopelandSoftware Testing’s Future—According to Lee Copeland
Software Testing’s Future—According to Lee Copeland
 
10 things I've learned
10 things I've learned10 things I've learned
10 things I've learned
 
Что нам стоіт таск манагер построіт. Ігор Лущик. LvivPy #6
Что нам стоіт таск манагер построіт. Ігор Лущик. LvivPy #6Что нам стоіт таск манагер построіт. Ігор Лущик. LvivPy #6
Что нам стоіт таск манагер построіт. Ігор Лущик. LvivPy #6
 
Get testing bottlenecks out of your pipelines
Get testing bottlenecks out of your pipelinesGet testing bottlenecks out of your pipelines
Get testing bottlenecks out of your pipelines
 
The Whole Team Approach to Quality in Continuous Delivery
The Whole Team Approach to Quality in Continuous DeliveryThe Whole Team Approach to Quality in Continuous Delivery
The Whole Team Approach to Quality in Continuous Delivery
 
CMP Presentation
CMP PresentationCMP Presentation
CMP Presentation
 
Escaping the Pitfalls of Software Product Development
Escaping the Pitfalls of Software Product DevelopmentEscaping the Pitfalls of Software Product Development
Escaping the Pitfalls of Software Product Development
 
Microservices Summit - The Human Side of Services
Microservices Summit - The Human Side of ServicesMicroservices Summit - The Human Side of Services
Microservices Summit - The Human Side of Services
 
Best Practices for Testing Open Source Projects
Best Practices for Testing Open Source ProjectsBest Practices for Testing Open Source Projects
Best Practices for Testing Open Source Projects
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUG
 
Openagile
OpenagileOpenagile
Openagile
 
Demystifying DevOps - it's not Agile, but they're friends
Demystifying DevOps - it's not Agile, but they're friendsDemystifying DevOps - it's not Agile, but they're friends
Demystifying DevOps - it's not Agile, but they're friends
 
Startup Engineering culture - "What matters & what does not"
Startup Engineering culture - "What matters & what does not"Startup Engineering culture - "What matters & what does not"
Startup Engineering culture - "What matters & what does not"
 
Planning Agile Projects
Planning Agile ProjectsPlanning Agile Projects
Planning Agile Projects
 
Sandstorm or Significant? The evolving role of situational context in inciden...
Sandstorm or Significant? The evolving role of situational context in inciden...Sandstorm or Significant? The evolving role of situational context in inciden...
Sandstorm or Significant? The evolving role of situational context in inciden...
 
Good project from scratch - from developer's point of view
Good project from scratch - from developer's point of viewGood project from scratch - from developer's point of view
Good project from scratch - from developer's point of view
 

En vedette (10)

Virus in computer via Internet by Sundas ilyas Kiani
Virus in computer via Internet  by Sundas ilyas KianiVirus in computer via Internet  by Sundas ilyas Kiani
Virus in computer via Internet by Sundas ilyas Kiani
 
ข้อสอบ O net
ข้อสอบ O  netข้อสอบ O  net
ข้อสอบ O net
 
การประกันภัย
การประกันภัย การประกันภัย
การประกันภัย
 
ค.ป.ภ
ค.ป.ภค.ป.ภ
ค.ป.ภ
 
แฮกเกอร์ การ์ตูน
แฮกเกอร์ การ์ตูนแฮกเกอร์ การ์ตูน
แฮกเกอร์ การ์ตูน
 
คำถาม O net
คำถาม O netคำถาม O net
คำถาม O net
 
Presentation(group j)implementing trustworthy computing by Sundas Ilyas
Presentation(group j)implementing  trustworthy computing by Sundas IlyasPresentation(group j)implementing  trustworthy computing by Sundas Ilyas
Presentation(group j)implementing trustworthy computing by Sundas Ilyas
 
แบบทดสอบ O-net
แบบทดสอบ O-net แบบทดสอบ O-net
แบบทดสอบ O-net
 
Hotel reservation system
Hotel reservation systemHotel reservation system
Hotel reservation system
 
Home appliances control system
Home appliances control systemHome appliances control system
Home appliances control system
 

Similaire à Importance of test automation, excuses and TDD introduction

Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 
Test Driven Design by Jonas Auken
Test Driven Design by Jonas AukenTest Driven Design by Jonas Auken
Test Driven Design by Jonas Auken
agilencr
 
Driving Quality with TDD
Driving Quality with TDDDriving Quality with TDD
Driving Quality with TDD
Steven Mak
 

Similaire à Importance of test automation, excuses and TDD introduction (20)

Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Unit Testing talk
Unit Testing talkUnit Testing talk
Unit Testing talk
 
Tdd
TddTdd
Tdd
 
TDD, the way to better software | Dan Ursu | CodeWay 2015
TDD, the way to better software | Dan Ursu | CodeWay 2015TDD, the way to better software | Dan Ursu | CodeWay 2015
TDD, the way to better software | Dan Ursu | CodeWay 2015
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
(Best) Practices for the Solo Developer
(Best) Practices for the Solo Developer(Best) Practices for the Solo Developer
(Best) Practices for the Solo Developer
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Test Driven Design by Jonas Auken
Test Driven Design by Jonas AukenTest Driven Design by Jonas Auken
Test Driven Design by Jonas Auken
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Clean Code Talk (draft)
Clean Code Talk (draft)Clean Code Talk (draft)
Clean Code Talk (draft)
 
Gerrit Coetzee “Thou Shalt Write Things Down. And Other Rules for Managing Pr...
Gerrit Coetzee “Thou Shalt Write Things Down. And Other Rules for Managing Pr...Gerrit Coetzee “Thou Shalt Write Things Down. And Other Rules for Managing Pr...
Gerrit Coetzee “Thou Shalt Write Things Down. And Other Rules for Managing Pr...
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Effective engineer
Effective engineerEffective engineer
Effective engineer
 
Driving Quality with TDD
Driving Quality with TDDDriving Quality with TDD
Driving Quality with TDD
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Dernier (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Importance of test automation, excuses and TDD introduction

  • 1. Test automation Is it really so good?
  • 2. @nicoDeBoose Nicolas De Boose • Consultant freelance • web • technical Lead @ I1 • married <3
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Excuse n.1 • Find your team leader • Don’t have one? Hire! • Do not learn on rush
  • 13. Excuse n. 2 • Read amazing books
  • 14.
  • 15. Excuse n.3 • A developer day: 5/25/70 • Compare apples with pears • Make statistics
  • 17.
  • 18. Excuse n.6 • You are the « expert » • Old developers?
  • 19. Excuse n. 7 • Badly designed code • Don’t give up! • Start easy w/o pressure • And …
  • 20.
  • 21.
  • 22.
  • 23. TDD • Test before code • Iterations of 2 minutes • List problems • Fast feedback • 1 bug = 1 test
  • 24. TDD • Coverage 100% • Maintainable • Decoupled
  • 25. "What the research team found was that the TDD teams produced code that was 60 to 90 percent better in terms of defect density than non-TDD teams." "They also discovered that TDD teams took longer to complete their projects—15 to 35 percent longer."
  • 26. "Over 3 iterations, average time taken to complete the kata without TDD was 28m 40s. Average time with TDD was 25m 27s." "Without TDD, on average I made 5.7 passes (delivering into acceptance testing). With TDD, on average I made 1.3 passes (in two attempts, they passed first time, in one it took 2 passes.)" Codeman ship: Code Lab experiment
  • 27. TDD Conclusion • Less bugs • Better code/design • 100% Coverage • Confidence • Documentation • Debug time decreased • It's personal!
  • 28. Conclusion • Discipline & Professionalism • Test prove presence of bugs, not absence • Don't forget « money tests » • Prevention is better than cure (Cost of fix)

Notes de l'éditeur

  1. Pour remplacer cette image, sélectionnez-la et supprimez-la. Cliquez ensuite sur l’icône Insérer une image pour la remplacer par une de vos images.
  2. On va commencer par parler un peu de code spageti. Du code comme ca, tous les dev en ont déjà vu. Pour ceux qui ne connaisse pas bien ce terme en gros, voilà à quoi cela ressemblerait pour un technicien. Comme vous pouvez le voir c’est assez fouilli  Voilà ce qui ralenti le plus les développeurs: le code illisible. En plus d’être illisible, c’est souvent celui qui amène le plus de bug et de dommages collatéraux.
  3. Du coup, ce genre de code, c’est pas celui où tu es le plus confiant… Donc tu as peur de le cleaner… Pourquoi? Parce que si tu le casses... Ca devient ton code! Et donc tu préfère juste laisser le code comme ca plutôt que de cleaner… On en revient à faire ces fameux quick’n’dirty. - Le fameux Quick'n'dirty sur lequel on reviendra plus tard qui est resté là... Et qui s'est accumulé au fil des années pour devenir un animal tentaculaire impossible à dompter. Le code pourri, ca nous ralenti... Pourquoi on écrit du code pourri? Pour aller plus vite... You don't go fast by doing crap +
  4. On s’essouffle peu à peu: Au plus le code pourri Debug devient compliqué… les estimations augmentent... La peur de cleaner augmente
  5. Les managers n’aiment pas avoir de grosses estimations donc on le dit qu’on va changer tout ca ! Epis, on se dit qu'on peut cleaner le code et on promet qu'après tout ira mieux... Que les estimations vont baisser etc… Mais cleaner le code est risky.... On a de la doc qui nous permet de savoir comment les choses doivent fonctionner…. On prend des semaines et après on a pas fait tout ce qu'on voulait, on a passé du temps à débugger des trucs qu'on a refac.
  6. On envoit ca à QA, et là... C'est le drame, on a tellement de bug que la solution la plus censée est de revert les refac parce qu'on sait meme pas estimé la charge de travail. Quand on délivre au QA, on s'attend à quoi? Nothing! C'est le but d'une équipe PRO! sinon c'est pas professionel. Des projets de GROS refactoring sans test, ca marche pas. On attend une new feature et ptit a ptit, en ajoutant les nouvelles feature dans le legacy avec des tests... Certaines parties ne seront pas testées après des années, mais on est confiant que le code fonctionne vu qu'il n'a plus bougé depuis des années... On verra quand il faudra le modifier... Si t'as la choix de modifier ou d'écrire un nouveau module. Fais le nouveau en tdd
  7. C’est assez pour se dire : " Plus jamais on ne nous y prendra!"! Et les managers ne veulent plus entendre parler de refac :)
  8. Le code continue de pourrir, la productivité empire de semaines en semaine… Et on ose plus rien faire… Paralyser par la peur!  Bref, on peut pas cleaner du code sans enlever la peur…. Il faut donc pouvoir enlever la peur! 
  9. We need a parachute! Comment enlever cette peur? En écrivant des tests! TEST = PARACHUTE
  10. - I have no knowledge, no skills - You must have a leader? - You don't? Then hire one! Avec de l'entrainement, on y arrive. En 2 semaines, on peut arriver à du truc pas trop mal. Quand on y reviendra, on refactorera
  11. Je ne test pas parce que j'ai du code legacy... Vous inquiétez pas vous n'etes pas les seuls?  C'est pas trop tard, il y a des techniques et des types de tests... D'ailleurs y'a un livre (voir next slide) là dessus
  12. Michael Feathers: Du code legacy c'est du code sans test. Ici y'a plein d'astuces!
  13. - No time!​ - I'm must develop features ASAP ... And probably fix bugs? Est-ce que vous vous relisez avant d'envoyer un e-mail important?  http://blogs.msdn.com/b/peterhal/archive/2006/01/04/509302.aspx https://blogs.msdn.microsoft.com/peterhal/2006/01/04/what-do-programmers-really-do-anyway-aka-part-2-of-the-yardstick-saga/ According to Peter, developers actually spend their days like this (while not reading Code Rant of course :): Writing new code 5% Modifying existing code 25% Understanding Code 70%
  14. It's like coding twice ... Like accounting ? Do you prefer testing twice? :) More seriously... (next slide)
  15. Un programme est qqchose de sensible. Tu bouges un bit à un endroit et ca peut faire crasher un serveur! Peu de métier sont comme ca... Si tu enlève un clou ou une brique de ta maison, elle ne va pas s'effondrer.. Même dans notre corps, on peut enlever une cellule, et ne mourra pas... ------ La comptabilité par contre, si je me goure d'un chiffre au mauvais endroit, je peux mettre une compagnie en faillite et mettre le boss en prison... Comment il faut? Y'a 700 ans, ils ont trouvé l'astuce: rentrez les infos deux fois: crédit, débit... Après plein de calcul, on doit arriver à zero... Biensur que c'est pas parfait. Le tdd c'est pareil, tout est mis en double. They meet in a green bar. Errors made by programmers moins severe et moins chere que par un comptable? Source code moins important que spreadcheets? Nos employés dependent moins de notre code que de la compte? As professsionel, no... Et by the way, ils font pas tout le débit au début et tout le crédrit à la fin... Ils font ca en meme temps. Pourquoi ne pas faire comme les comptables? Comptabilité en partie double : Néanmoins, ce système était déjà d'emploi fréquent dans les banques italiennes depuis la fin du xiiie. De récentes découvertes (papyrus Boulaq 18) situent cette invention bien plus tôt dans le temps, en Égypte antique, il y a environ 3700 an
  16. The mistake you are making is that you are seeing testing as a time investment with no immediate return. It doesn't necessarily work like that. Lorsqu'on code sans test on rajoute des features, mais rien ne dit que le reste fonctionne... Même le truc qu'on a regardé dans le browser y'a 5 minutes...
  17. That's because your code is not nicely coded maybe :) If your tests are hard to write then, the code they test is probably hard to use and does a lot of things... And is not reusable, decoupled. By reusable, ca veut pas dire dans un autre projet forcément. 
  18. L'histoire de faire des tests après: C'est CHIANT! "J'ai plus qu'à écrire mes tests" - Cout des tests: 20%... Et +200% au début! Car un dev va dire: j'ai fini, j'ai plus qu'a tester unitairement... C'est là que ca se corse: Le code est pas testable, il faut refac (+100%), et faire les tests qu'on ne maitrise pas encore vraiment (+100%). Une formation (ou un teacher) est donc plus que recommandée pour éviter ce genre de dérive. Si on écrit les tests après, on aura pas confiance aux tests.. Parce que faire les tests après, c'est chiant, parce qu'on sait déjà que le code fonctionne! C'est pas nécessaire, donc on a l'impression que c'est une perte de temps et qu'on le fait "parce qu'on doit le faire"... Et donc on va prendre des raccourcis DANS LES TESTS (et donc ton parachute)... Il va y avoir des trous... Qui saute avec un parachute avec des trous?
  19. - LA PYRAMIDE du test (mike cohn) - UT: UNITAIRE, Court (et donc moins couteux), debug facile et donc + rapide. Le mythe du code coverage: 100% ne veut rien dire. - Func/Intégration: Plusieurs classes ensemble, Long, debug compliqué(mais pourquoi ce bouton n'est pas disabled, un flag db? Une fonction a retourné autre chose? Le user n'a plus les droits?). Maintenance cher - Scenario/UI/E2E: Très long, debug très compliqué (pourquoi mon panier est vide? Est-ce qu'il a été vidé entre deux pages? Avant que je click sur payer? Ou n'a-t-il tout simplement jamais été rempli?). Maintenance très chere. Il faut de tout pour faire un monde. Tous les TU peuvent passer mais on peut avoir des bugs, d'où la nécessité d'avoir des tests fonctionnels et des scénarios. --------------- On legacy
  20. C'est quoi? On écrite le test qui fail avant le code. Dur de se concentrer sur plusieurs choses en meme temps. Donc on fait les trucs one by one - Tout code est tester (code coverage 100%, on en parle meme plus) - Faire une liste de ce qu'il faut tester - Un bug = un test = une correction - Avantage : Savoir donner un feedback: Voilà une liste de ce qui  est dev, voilà ce qu'il reste EXACTEMENT. Et pas un approximatif: j'ai fait 75%. On peut arreter un dev et on sait direct où il en est Interrompt un mec qui fait du tdd, il n'y a pas si longtemps que ca il avait d'office un code qui compilait avec des tests qui passent! Peu importe qui et quand. Comment te sentirais tu si tu savais que TOUT fonctionne comme sur des roulettes 2-3 minutes avant? Ca serait plus simple pour débugger non? Combien de temps tu passerais a debugger ces 2 minutes de dev?
  21. Quand tu écris d'abord les tests, tu trust le test. Le tdd permet de garder un code maintenable avec une bonne architecture. Sans test le code pourri... Pour ca il faut avoir confiance à ses tests... En faisant du tdd par exemple :) Parce que chaque ligne sera là parce pour un but. TDD: Pq on n'écrit pas direct le bon code? Mwé.. Les peintres font des croquis, les compositeurs pareil, journaliste,... etc Les tests, c'est la doc: Tu veux savoir comment utiliser une fonction? Il y a un test pour ca qui pourra te le dire! Ils sont parfaitement sync! Bye bye le cout de la documentation WORD/Pdf/confluence Make production code testable! Un autre mot pour testable = découpled! Improve DESIGN! Yeah
  22. “Over a development cycle of 12 months, 35 percent is another four months, which is huge,” Nagappan says. “However, the tradeoff is that you reduce post-release maintenance costs significantly, since code quality is so much better. Again, these are decisions that managers have to make—where should they take the hit? But now, they actually have quantified data for making those decisions.”. http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx ---- + http://www.codemanship.co.uk/parlezuml/blog/?postid=1021 Over 3 iterations, average time taken to complete the kata without TDD was 28m 40s. Average time with TDD was 25m 27s. Without TDD, on average I made 5.7 passes (delivering into acceptance testing). With TDD, on average I made 1.3 passes (in two attempts, they passed first time, in one it took 2 passes.)
  23. + http://www.codemanship.co.uk/parlezuml/blog/?postid=1021 jason.gorman
  24. - Le dev doit le sentir Comment on fait en sorte que la team suive? You don't! Let other people take care of theirself. Les autres vont commencer à voir que vous allez plus vite, que le code est plus propre et que vous avez moins de bug... Et là, il sera temps d'assouvir leur curiosité :) tdd is a personal practice (discipline = set or fules), le boss doit pas l'interdire... Chacun son job. On demande pas la permission de mettre des best practices, espace au lieu de tab...
  25. discipline & profesionalisme!!!! Les bugs compliqués vont toujours arrivés, mais bcp moins souvent! Le test parfait n'existe pas, tout comme le code parfait. Les deux doivent constamment être refac Test proove presence of bugs, not absence. le goal c'est de se faire un parachute. 100% est impossible, mais 99.999 c'est déjà pas mal :) Si je te donne le meilleur code du monde, mais sans test, tu vas avoir peur de le changer et donc le code va pourrir. Si je te donne un code bif bof mais super bien tester, tu pourras le cleaner et donc le code va s'améliorer - Les tests qui font gagner des sous, mais qu'on fait moins: - Test de perf: Cfr amazon et ses bénéfices par second/millisecondes - Test d'ergonomie: Gagner des sous - A/B testing: Gagner des sous ------------- + cost of fixing http://www.seguetech.com/blog/2014/03/31/rising-cost-defects-2 http://www.jrothman.com/articles/2000/10/what-does-it-cost-you-to-fix-a-defect-and-why-should-you-care/ “We’ll fix that when we have time. In the meantime, just keep developing! How can you possibly tell how much it will cost to fix later?” — An Engineering manager, eager to continue software development “Let’s find all the defects before system test. The customer will wait for the product.” — An Engineering manager, concerned that shipping a product with defects would prevent customers from buying the product - Pouvoir le reproduire en DEV - Plus difficile de trouver la root cause que pendant la période de dev... Vu que t'es le nez dedans - Peu engendrer un refactoring ... Et c'est plus chaud de faire du refac sur un code déjà en prod + T'as plus le nez dedans (encore une fois) - Pendant que tu fix ton bug, tu ne crées RIEN - Et si le bug empeche de finaliser une vente? Ex: Toyota qui rappelle ses voitures, Une fusée qui explose - Et la réputation?