SlideShare une entreprise Scribd logo
1  sur  26
HOW TO TEST YER SOFTWARE
                                     DYLAN SWARTZ




Friday, April 19, 13
HI. I’M DYLAN!
            I MAKE JAVA
            CODE AT SVSU.
Friday, April 19, 13
THIS IS
  MY
  FRIEND,
  IGGY.
                       http://ivpg.in/
Friday, April 19, 13
ACCEPTANCE TESTS
 UNIT TESTING
TEST DRIVEN DEV
INTEGRATION TESTING
BEHAVIOR DRIVEN DEV
Friday, April 19, 13
WE ALL TEST OUR CODE
  CODE.
  COMPILE.
  RUN.
  TEST.
Friday, April 19, 13
WE ALL TEST OUR CODE
   CODE. CODE.
   COMPILE. COMPILE.
   RUN.     RUN.
   TEST.    TEST.
Friday, April 19, 13
WE ALL TEST OUR CODE
                 CODE. CODE.       CODE.
                 COMPILE. COMPILE. COMPILE.
                 RUN.     RUN.     RUN.
                 TEST.    TEST.    TEST.


Friday, April 19, 13
WE ALL TEST OUR CODE
     CODE.             CODE.      CODE.      CODE.    CODE.
     COMPILE.          COMPILE.   COMPILE.   COMPILE. COMPILE.
     RUN.              RUN.       RUN.       RUN.     RUN.
     TEST.             TEST.      TEST.      TEST.    TEST.
     CODE.             CODE.      CODE.      CODE.    CODE.
     COMPILE.          COMPILE.   COMPILE.   COMPILE. COMPILE.
     RUN.              RUN.       RUN.       RUN.     RUN.
     TEST.             TEST.      TEST.      TEST.    TEST.


Friday, April 19, 13
THERE’S GOT
TO BE A
BETTER
WAY?!!??
Friday, April 19, 13
THE UNIT TEST

Friday, April 19, 13
the smallest testable
                       part of an application
                       is called a unit.


Friday, April 19, 13
Unit testing can be defined as
            taking units, isolating ‘em from the
            rest of the code, and determining if
            it behaves exactly as you’d expect.



Friday, April 19, 13
MAKE INTO C++




Friday, April 19, 13
MAKE INTO C++




Friday, April 19, 13
MAKE INTO C++




Friday, April 19, 13
TESTING FRAMEWORKS


Friday, April 19, 13
Frameworks:
               are semi-complete
               applications.
               provide a reusable, common
               structure to share among
               applications.

               allow developers to extend
               them to meet their needs.


Friday, April 19, 13
CppUTest
    JUnit is a popular testing
    framework that will help us write
    our tests.



Friday, April 19, 13
MAKE INTO C++




Friday, April 19, 13
WOO!




Friday, April 19, 13
TEST
  DRIVEN
  DEVELOPMENT

Friday, April 19, 13
When doing
               TDD, you write
               a failing test
               first.
Friday, April 19, 13
After writing your
               test. Write the
               SMALLEST amount of
               code possible to make
               the test pass.

Friday, April 19, 13
REFACTOR!

Friday, April 19, 13
CODING TIME


Friday, April 19, 13
CONTACT INFOS:
                       dylan@svsu.edu

                       github.com/dylanswartz

                       @dylan_swartz
Friday, April 19, 13

Contenu connexe

En vedette

Vallejos maria lujan ppt
Vallejos maria lujan  pptVallejos maria lujan  ppt
Vallejos maria lujan pptmariluji
 
Lake County Summer Olympics 2013 – TIA Project
Lake County Summer Olympics 2013 – TIA ProjectLake County Summer Olympics 2013 – TIA Project
Lake County Summer Olympics 2013 – TIA ProjectStephanie_Fuller
 
Lead Generation
Lead GenerationLead Generation
Lead GenerationAmy Smith
 
Build+engage+recruit
Build+engage+recruitBuild+engage+recruit
Build+engage+recruitAmy Smith
 
Ppt,vallejos lujan
Ppt,vallejos lujanPpt,vallejos lujan
Ppt,vallejos lujanmariluji
 
Happy birthday justin
Happy birthday justinHappy birthday justin
Happy birthday justinEm Graves
 

En vedette (7)

Vallejos maria lujan ppt
Vallejos maria lujan  pptVallejos maria lujan  ppt
Vallejos maria lujan ppt
 
Lake County Summer Olympics 2013 – TIA Project
Lake County Summer Olympics 2013 – TIA ProjectLake County Summer Olympics 2013 – TIA Project
Lake County Summer Olympics 2013 – TIA Project
 
Lead Generation
Lead GenerationLead Generation
Lead Generation
 
Build+engage+recruit
Build+engage+recruitBuild+engage+recruit
Build+engage+recruit
 
Ppt,vallejos lujan
Ppt,vallejos lujanPpt,vallejos lujan
Ppt,vallejos lujan
 
Happy birthday justin
Happy birthday justinHappy birthday justin
Happy birthday justin
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 

Similaire à Unit Testing

Keeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg ShacklesKeeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg ShacklesXamarin
 
Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Martin de Keijzer
 
Writing testable code
Writing testable codeWriting testable code
Writing testable codeAlvaro Videla
 
Native Javascript apps with PhoneGap
Native Javascript apps with PhoneGapNative Javascript apps with PhoneGap
Native Javascript apps with PhoneGapMartin de Keijzer
 
From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15Jan Jongboom
 
Experiências, Erros e Acertos no Desenvolvimento de Projetos Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projetos ÁgeisExperiências, Erros e Acertos no Desenvolvimento de Projetos Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projetos ÁgeisLambda 3
 
Performance Testing [not] somebody I used to know
Performance Testing [not] somebody I used to knowPerformance Testing [not] somebody I used to know
Performance Testing [not] somebody I used to know90kts
 
NodeJS: Writing tests -- A Beginners' Guide
NodeJS: Writing tests -- A Beginners' GuideNodeJS: Writing tests -- A Beginners' Guide
NodeJS: Writing tests -- A Beginners' GuideGrey Ang
 
Unmoderated User Testing
Unmoderated User TestingUnmoderated User Testing
Unmoderated User TestingZURB
 
2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler DemocampsMarcel Bruch
 
Intravert atx meetup_condensed
Intravert atx meetup_condensedIntravert atx meetup_condensed
Intravert atx meetup_condensedzznate
 
Calabash - Karl and Jonas
Calabash - Karl and JonasCalabash - Karl and Jonas
Calabash - Karl and JonasXamarin
 
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"Talent42
 

Similaire à Unit Testing (16)

Clean Unit Tests
Clean Unit Tests Clean Unit Tests
Clean Unit Tests
 
Keeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg ShacklesKeeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg Shackles
 
Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2Hybrid Mobile Web Apps with Sencha Touch 2
Hybrid Mobile Web Apps with Sencha Touch 2
 
Writing testable code
Writing testable codeWriting testable code
Writing testable code
 
Native Javascript apps with PhoneGap
Native Javascript apps with PhoneGapNative Javascript apps with PhoneGap
Native Javascript apps with PhoneGap
 
From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15
 
Experiências, Erros e Acertos no Desenvolvimento de Projetos Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projetos ÁgeisExperiências, Erros e Acertos no Desenvolvimento de Projetos Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projetos Ágeis
 
Performance Testing [not] somebody I used to know
Performance Testing [not] somebody I used to knowPerformance Testing [not] somebody I used to know
Performance Testing [not] somebody I used to know
 
NodeJS: Writing tests -- A Beginners' Guide
NodeJS: Writing tests -- A Beginners' GuideNodeJS: Writing tests -- A Beginners' Guide
NodeJS: Writing tests -- A Beginners' Guide
 
Testable Code ... In Joomla!?
Testable Code ... In Joomla!?Testable Code ... In Joomla!?
Testable Code ... In Joomla!?
 
Unmoderated User Testing
Unmoderated User TestingUnmoderated User Testing
Unmoderated User Testing
 
2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps
 
Intravert atx meetup_condensed
Intravert atx meetup_condensedIntravert atx meetup_condensed
Intravert atx meetup_condensed
 
Calabash - Karl and Jonas
Calabash - Karl and JonasCalabash - Karl and Jonas
Calabash - Karl and Jonas
 
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"
Joel Spolsky "Joel Spolsky on Hiring Great Tech Talent"
 
Writing the docs
Writing the docsWriting the docs
Writing the docs
 

Dernier

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 

Dernier (20)

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

Unit Testing