SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
TEST DRIVEN DEVELOPMENT
                      Auckland WebDev Nights Meetup - 26th April 2012




Sunday, 29 April 12
Who are you?
                      Hi, I’m Caleb Tutty - [that’s Tuh-tee]

                      Ruby on Rails developer working at onebigvoice

                      twitter: @Caleb_T

                      email: caleb@prettymint.co.nz

                      github: https://github.com/tuttinator


                      Feel free to pipe up with questions at any point, but there will be time at the end too.



Sunday, 29 April 12
What do I mean by testing?
                      Automated testing. Tests written by developers to check the
                      functionality of their application behaves as they expect it to.
                      (Assertions). These tests are run by a test suite.

                      Test broadly fall into two groups - unit tests and integration tests

                      Unit tests look at isolated parts of functionality, and ensuring
                      that each part does what you thought it should. (e.g.
                      Controllers and Models)

                      Integration tests are higher level - and aimed at the integrated
                      user experience. These test that everything plays nicely with
                      each other (e.g. the View layer interacting with Controllers
                      and models)


Sunday, 29 April 12
Cool, got it.
                      ...so when should I test?




Sunday, 29 April 12
Cool, got it.
                          ...so when should I test?

                      Not in production!

                      Before you merge into the master branch of your
                      source control

                      Actually, TATFT




Sunday, 29 April 12
TAFT?

                      Test all the f@#&ing time.*

                      Bryan Liles - http://www.confreaks.com/videos/496-
                      rubyhoedown2008-lightning-talk-tatft-test-all-the-f-in-time

                      * Remember this as a qualification for later:

                              “Quidquid latine dictum sit, altum sonatur.”



Sunday, 29 April 12
Really, all the time? Why?
                      Tests give you notifications when a change
                      breaks part of your app

                      Tests tell you where to look

                      Tests document your application

                      Tests help you work in teams

                      Tests mean that you can come back to a feature
                      later and remind you what the hell you were
                      doing

Sunday, 29 April 12
ENOUGH TALKING, NOW
            SHOW ME SOMETHING COOL



Sunday, 29 April 12
“Quidquid latine dictum sit,
                           altum sonatur.”
                       Anything in Latin sounds
                             profound...




Sunday, 29 April 12
Too much testing?

                      “I get paid for code that works, not for tests, so my philosophy is to test
                      as little as possible to reach a given level of confidence (I suspect this
                      level of confidence is high compared to industry standards, but that
                      could just be hubris). If I don’t typically make a kind of mistake (like
                      setting the wrong variables in a constructor), I don’t test for it. I do tend
                      to make sense of test errors, so I’m extra careful when I have logic with
                      complicated conditionals. When coding on a team, I modify my
                      strategy to carefully test code that we, collectively, tend to get
                      wrong.” - Kent Bent, of Test First development fame

                               source: http://stackoverflow.com/questions/153234/how-deep-are-your-unit-tests/
                                                                                             153565#153565




Sunday, 29 April 12
Too much testing?

                      “When developers first discover the wonders of
                      test-driven development, it’s like gaining entrance
                      to a new and better world with less stress and
                      insecurity. It truly is a wonderful experience well
                      worth celebrating. But internalizing the benefits of
                      testing is only the first step to enlightenment.
                      Knowing what not to test is the harder part of the
                      lesson.” - DHH (creator of Rails)
                                        source: http://37signals.com/svn/posts/3159-testing-like-the-tsa




Sunday, 29 April 12
but testing is only for Rails
                                    devs, amirite?
                      Nope!
                      PHP
                      https://github.com/sebastianbergmann/phpunit/

                      http://symfony.com/doc/current/book/testing.html


                      Python
                      http://pytest.org/latest/


                      Node.js and JavaScript
                      http://pivotal.github.com/jasmine/

                      http://elegantcode.com/2011/03/07/taking-baby-steps-with-node-js-bdd-style-unit-tests-with-jasmine-node-sprinkled-with-some-should/


                      AS3 - I know there’s a Flex Dev in the audience
                      http://asunit.org/


                      .NET - Visual Studio has unit testing since VS 2005 -
                      http://msdn.microsoft.com/en-us/library/ms243147.aspx (well.. except for the free Express versions - http://greenicicleblog.com/2010/04/13/visual-studio-2010-express-no-
                      tests-please/ and http://www.hexsaw.org.uk/2011/01/13/once-more-on-tdd-and-microsoft-visual-studio-2010-express-edition/ )

                      “I’m not one who says everything should be free. Microsoft do not claim to offer a free full-blown development environment; that’s OK. But from all things that you can
                      leave out: why does it have to be the all abilities to run unit tests? That seems like a strange signal towards the importance of quality.”




Sunday, 29 April 12
is there moar?

                      Beyond the scope of this talk:

                      Factories versus Fixtures

                      Cucumber and BDD

                      JavaScript testing

                      Spork and Continuous Integration Servers



Sunday, 29 April 12
QUESTIONS?




Sunday, 29 April 12

Mais conteúdo relacionado

Destaque

Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του Βιβλίου
Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του ΒιβλίουΒιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του Βιβλίου
Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του ΒιβλίουLol Lolakos
 
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...Ηλιάδης Ηλίας
 
Herramientas Informáticas que se pueden utilizar en el área de Psicología
Herramientas Informáticas que se pueden utilizar en el área de PsicologíaHerramientas Informáticas que se pueden utilizar en el área de Psicología
Herramientas Informáticas que se pueden utilizar en el área de PsicologíaJulio Roberto Alvarado
 
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"ORDEN SEGLAR CARMELITAS DESCALZOS
 
Estrategiaslingestudio2012
Estrategiaslingestudio2012Estrategiaslingestudio2012
Estrategiaslingestudio2012blognms
 
La esencia de los equipos auto-gestionados y el Líder Jardinero
La esencia de los equipos auto-gestionados y el Líder JardineroLa esencia de los equipos auto-gestionados y el Líder Jardinero
La esencia de los equipos auto-gestionados y el Líder JardineroVerónica Vera
 
Dpw retiree celebration picture slide format
Dpw retiree celebration   picture slide formatDpw retiree celebration   picture slide format
Dpw retiree celebration picture slide formatDanita Ogandaga
 
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.com
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.comUsing Video to Drive Sales by Richter10.2 Media Group - www.r102video.com
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.comRICHTER
 
Fibra residual, una alternativa de mitigacion para la contaminacion ambiental
Fibra residual, una alternativa de mitigacion para la contaminacion ambientalFibra residual, una alternativa de mitigacion para la contaminacion ambiental
Fibra residual, una alternativa de mitigacion para la contaminacion ambientalJohana Margarita Castellar Cohen
 
Make Google AdWords More Effective
Make Google AdWords More EffectiveMake Google AdWords More Effective
Make Google AdWords More Effectivecorneliafaith
 
Desmontaje de la computadora
Desmontaje de la computadoraDesmontaje de la computadora
Desmontaje de la computadorasaby2403
 
Broschüre Agentur Leven
Broschüre Agentur LevenBroschüre Agentur Leven
Broschüre Agentur LevenKevin Bohsem
 
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...yStats.com
 

Destaque (20)

Speed up Rails Responses
Speed up Rails ResponsesSpeed up Rails Responses
Speed up Rails Responses
 
Web Crypto
Web CryptoWeb Crypto
Web Crypto
 
Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του Βιβλίου
Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του ΒιβλίουΒιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του Βιβλίου
Βιολογία Α Γυμνασίου Ερωτήσεις-Απαντήσεις-Ασκήσεις με Λύσεις του Βιβλίου
 
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...
Η μέλισσα, ένα ασπόνδυλο ζώο / Σπονδυλωτά και ασπόνδυλα ζώα - 3η Ενότητα: Κεφ...
 
Herramientas Informáticas que se pueden utilizar en el área de Psicología
Herramientas Informáticas que se pueden utilizar en el área de PsicologíaHerramientas Informáticas que se pueden utilizar en el área de Psicología
Herramientas Informáticas que se pueden utilizar en el área de Psicología
 
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"
CICLASUR 2016 - TEMA 1 - "Teresa de Los Andes Enamorada de Jesucristo"
 
Estrategiaslingestudio2012
Estrategiaslingestudio2012Estrategiaslingestudio2012
Estrategiaslingestudio2012
 
La esencia de los equipos auto-gestionados y el Líder Jardinero
La esencia de los equipos auto-gestionados y el Líder JardineroLa esencia de los equipos auto-gestionados y el Líder Jardinero
La esencia de los equipos auto-gestionados y el Líder Jardinero
 
Revista Ayudeporte Nº 4
Revista Ayudeporte Nº 4Revista Ayudeporte Nº 4
Revista Ayudeporte Nº 4
 
caricaturen Marin
caricaturen Marincaricaturen Marin
caricaturen Marin
 
Rentabiliza Clientes
Rentabiliza ClientesRentabiliza Clientes
Rentabiliza Clientes
 
Dpw retiree celebration picture slide format
Dpw retiree celebration   picture slide formatDpw retiree celebration   picture slide format
Dpw retiree celebration picture slide format
 
24234
2423424234
24234
 
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.com
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.comUsing Video to Drive Sales by Richter10.2 Media Group - www.r102video.com
Using Video to Drive Sales by Richter10.2 Media Group - www.r102video.com
 
Avances en swh ignacio malaga
Avances en swh ignacio malagaAvances en swh ignacio malaga
Avances en swh ignacio malaga
 
Fibra residual, una alternativa de mitigacion para la contaminacion ambiental
Fibra residual, una alternativa de mitigacion para la contaminacion ambientalFibra residual, una alternativa de mitigacion para la contaminacion ambiental
Fibra residual, una alternativa de mitigacion para la contaminacion ambiental
 
Make Google AdWords More Effective
Make Google AdWords More EffectiveMake Google AdWords More Effective
Make Google AdWords More Effective
 
Desmontaje de la computadora
Desmontaje de la computadoraDesmontaje de la computadora
Desmontaje de la computadora
 
Broschüre Agentur Leven
Broschüre Agentur LevenBroschüre Agentur Leven
Broschüre Agentur Leven
 
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...
Brochure & Order Form_Middle East Internet & B2C E-Commerce Report 2012_by yS...
 

Semelhante a Test Driven Development - Caleb Tutty

Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonSeb Rose
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scalaPaweł Panasewicz
 
Testing and TDD - KoJUG
Testing and TDD - KoJUGTesting and TDD - KoJUG
Testing and TDD - KoJUGlburdz
 
SELJE_Database_Unit_Testing_Slides.pdf
SELJE_Database_Unit_Testing_Slides.pdfSELJE_Database_Unit_Testing_Slides.pdf
SELJE_Database_Unit_Testing_Slides.pdfEric Selje
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingPeter Presnell
 
An Introduction to unit testing
An Introduction to unit testingAn Introduction to unit testing
An Introduction to unit testingSteven Casey
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017Xavi Hidalgo
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And TechniquesJordan Baker
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Developmentsatya sudheer
 
5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-TestingMary Clemons
 
Software testing 2012 - A Year in Review
Software testing 2012 - A Year in ReviewSoftware testing 2012 - A Year in Review
Software testing 2012 - A Year in ReviewJohan Hoberg
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easierChristian Hujer
 
An Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAn Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAndy Melichar
 
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...Michael Larsen
 

Semelhante a Test Driven Development - Caleb Tutty (20)

Developer disciplines
Developer disciplinesDeveloper disciplines
Developer disciplines
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking Skeleton
 
Debugging
DebuggingDebugging
Debugging
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
 
Testing and TDD - KoJUG
Testing and TDD - KoJUGTesting and TDD - KoJUG
Testing and TDD - KoJUG
 
SELJE_Database_Unit_Testing_Slides.pdf
SELJE_Database_Unit_Testing_Slides.pdfSELJE_Database_Unit_Testing_Slides.pdf
SELJE_Database_Unit_Testing_Slides.pdf
 
DevOps
DevOpsDevOps
DevOps
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application Testing
 
An Introduction to unit testing
An Introduction to unit testingAn Introduction to unit testing
An Introduction to unit testing
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And Techniques
 
Agile test practices
Agile test practicesAgile test practices
Agile test practices
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Development
 
5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing5-Ways-to-Revolutionize-Your-Software-Testing
5-Ways-to-Revolutionize-Your-Software-Testing
 
Software testing 2012 - A Year in Review
Software testing 2012 - A Year in ReviewSoftware testing 2012 - A Year in Review
Software testing 2012 - A Year in Review
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier
 
PL/SQL unit testing with Ruby
PL/SQL unit testing with RubyPL/SQL unit testing with Ruby
PL/SQL unit testing with Ruby
 
An Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a TesterAn Agilist's Guide to Excelling on a Scrum Team as a Tester
An Agilist's Guide to Excelling on a Scrum Team as a Tester
 
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Test Driven Development - Caleb Tutty

  • 1. TEST DRIVEN DEVELOPMENT Auckland WebDev Nights Meetup - 26th April 2012 Sunday, 29 April 12
  • 2. Who are you? Hi, I’m Caleb Tutty - [that’s Tuh-tee] Ruby on Rails developer working at onebigvoice twitter: @Caleb_T email: caleb@prettymint.co.nz github: https://github.com/tuttinator Feel free to pipe up with questions at any point, but there will be time at the end too. Sunday, 29 April 12
  • 3. What do I mean by testing? Automated testing. Tests written by developers to check the functionality of their application behaves as they expect it to. (Assertions). These tests are run by a test suite. Test broadly fall into two groups - unit tests and integration tests Unit tests look at isolated parts of functionality, and ensuring that each part does what you thought it should. (e.g. Controllers and Models) Integration tests are higher level - and aimed at the integrated user experience. These test that everything plays nicely with each other (e.g. the View layer interacting with Controllers and models) Sunday, 29 April 12
  • 4. Cool, got it. ...so when should I test? Sunday, 29 April 12
  • 5. Cool, got it. ...so when should I test? Not in production! Before you merge into the master branch of your source control Actually, TATFT Sunday, 29 April 12
  • 6. TAFT? Test all the f@#&ing time.* Bryan Liles - http://www.confreaks.com/videos/496- rubyhoedown2008-lightning-talk-tatft-test-all-the-f-in-time * Remember this as a qualification for later: “Quidquid latine dictum sit, altum sonatur.” Sunday, 29 April 12
  • 7. Really, all the time? Why? Tests give you notifications when a change breaks part of your app Tests tell you where to look Tests document your application Tests help you work in teams Tests mean that you can come back to a feature later and remind you what the hell you were doing Sunday, 29 April 12
  • 8. ENOUGH TALKING, NOW SHOW ME SOMETHING COOL Sunday, 29 April 12
  • 9. “Quidquid latine dictum sit, altum sonatur.” Anything in Latin sounds profound... Sunday, 29 April 12
  • 10. Too much testing? “I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence (I suspect this level of confidence is high compared to industry standards, but that could just be hubris). If I don’t typically make a kind of mistake (like setting the wrong variables in a constructor), I don’t test for it. I do tend to make sense of test errors, so I’m extra careful when I have logic with complicated conditionals. When coding on a team, I modify my strategy to carefully test code that we, collectively, tend to get wrong.” - Kent Bent, of Test First development fame source: http://stackoverflow.com/questions/153234/how-deep-are-your-unit-tests/ 153565#153565 Sunday, 29 April 12
  • 11. Too much testing? “When developers first discover the wonders of test-driven development, it’s like gaining entrance to a new and better world with less stress and insecurity. It truly is a wonderful experience well worth celebrating. But internalizing the benefits of testing is only the first step to enlightenment. Knowing what not to test is the harder part of the lesson.” - DHH (creator of Rails) source: http://37signals.com/svn/posts/3159-testing-like-the-tsa Sunday, 29 April 12
  • 12. but testing is only for Rails devs, amirite? Nope! PHP https://github.com/sebastianbergmann/phpunit/ http://symfony.com/doc/current/book/testing.html Python http://pytest.org/latest/ Node.js and JavaScript http://pivotal.github.com/jasmine/ http://elegantcode.com/2011/03/07/taking-baby-steps-with-node-js-bdd-style-unit-tests-with-jasmine-node-sprinkled-with-some-should/ AS3 - I know there’s a Flex Dev in the audience http://asunit.org/ .NET - Visual Studio has unit testing since VS 2005 - http://msdn.microsoft.com/en-us/library/ms243147.aspx (well.. except for the free Express versions - http://greenicicleblog.com/2010/04/13/visual-studio-2010-express-no- tests-please/ and http://www.hexsaw.org.uk/2011/01/13/once-more-on-tdd-and-microsoft-visual-studio-2010-express-edition/ ) “I’m not one who says everything should be free. Microsoft do not claim to offer a free full-blown development environment; that’s OK. But from all things that you can leave out: why does it have to be the all abilities to run unit tests? That seems like a strange signal towards the importance of quality.” Sunday, 29 April 12
  • 13. is there moar? Beyond the scope of this talk: Factories versus Fixtures Cucumber and BDD JavaScript testing Spork and Continuous Integration Servers Sunday, 29 April 12