SlideShare una empresa de Scribd logo
1 de 12
for Code, Components and Systems Patterns In Testing
overview Why write tests? Purist vs. Practitioner New Code vs. Legacy Code Unit Testing Functional Testing User Driven Testing Test Automation Ecosystem 5/20/2010 Presented by Joe Chavez
Why write tests? 5/20/2010 Presented by Joe Chavez Catch defects during implementation Software testing is not the same as hardware testing More moving parts Documentation is often stale or non-existent Tests provide opportunity to document the intent of a class, component or system with working code Once written, tests are repeatable with very little overhead Test help a team maintain and more importantly change code with reduced risk Software tests can drive hardware testing Automated tools cannot capture the intent of the code – especially dynamic intent These tools complement the coding of tests, not replace
PURIST vs. Practitioner 5/20/2010 Presented by Joe Chavez
PURIST vs. Practitioner Balance achieved with Pragmatism Context is key Type of code: new, legacy, generated, etc. Robustness of tools Complexity of design Developer skillset Management support Perception is often that writing test code is not contributing to the bottom line Reality a few tests now can save time during the integration/delivery phases of a project 5/20/2010 Presented by Joe Chavez
New Code vs. Legacy Code New Code Can benefit greatly from a Test Driven approach Identify critical areas in the requirements/design that deliver most value Typically can use the best of breed testing tools & frameworks Legacy Code Improve – White box with Test Driven approach Incorporate – Characterize actual behavior in isolation Rewrite – Analyze existing code and write tests as part of new code Pair programming is helpful Can work in code review mode while writing tests Ideal situation: original programmer is part of the pair 5/20/2010 Presented by Joe Chavez
New Code vs. Legacy Code Special Cases: Open Source Usually come with a test suite – use caution if there is no test suite Generated Code  For C/C++ - characterize memory management Explore usage of generated code through writing tests 5/20/2010 Presented by Joe Chavez
Unit Testing Single Purpose Testing Focused on public methods of a class  View through the caller eyes Typically one (1) assertion check for pass/fail Code scenarios to verify correct behavior under normal and abusive conditions Testing Frameworks C# - NUnit C++ - UnitTest++ Java – jUnit Mocking Frameworks 5/20/2010 Presented by Joe Chavez
Functional Testing Verify the integration of several components and/or classes Use same testing framework that unit tests use Good for integration testing new/legacy/open source/generated code Verification scenarios Data flow between components Actual vs. expected results at each stage Use case scenarios 5/20/2010 Presented by Joe Chavez
USER Driven Testing Data Driven System A system that can be configured for execution based on an input data set and will produced an expected set of output data Test Application May require development of a test application – typically a console application Accepts file based input and/or command line options Produces file based output 5/20/2010 Presented by Joe Chavez
Test Automation Run tests early and often Integrate into the development/build process Visual Studio post build event msbuild/ant/make scripts Continuous Integration support Silent success and error on failure If all tests succeed then report silently (X number of test passed) If any test fails then fail the build Report failed test with a context (i.e. failed assertion, stack trace) Take corrective action before moving on 5/20/2010 Presented by Joe Chavez
IN CONTEXT 5/20/2010 Presented by Joe Chavez

Más contenido relacionado

La actualidad más candente

Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworksVishwanath KC
 
ISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - IntruductionISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - IntruductionQA Guards
 
Top 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual TestersTop 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual TestersSarah Elson
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Unit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual StudioUnit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual StudioAmit Choudhary
 
ISTQB Eğitim Sunumu
ISTQB Eğitim SunumuISTQB Eğitim Sunumu
ISTQB Eğitim SunumuMesut Güneş
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
Automated Testing DITA Content and Customizations
Automated Testing DITA Content and CustomizationsAutomated Testing DITA Content and Customizations
Automated Testing DITA Content and CustomizationsSteve Anderson
 
Intro to Manual Testing
Intro to Manual TestingIntro to Manual Testing
Intro to Manual TestingAyah Soufan
 
Software Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | EdurekaSoftware Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | EdurekaEdureka!
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript ApplicationsMuhammad Samu
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definitionVivek V
 
Automation testing interview pdf org
Automation testing interview pdf orgAutomation testing interview pdf org
Automation testing interview pdf orgTestbytes
 
Testing a GPS application | Testbytes
Testing a GPS application | TestbytesTesting a GPS application | Testbytes
Testing a GPS application | TestbytesTestbytes
 

La actualidad más candente (20)

Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
 
ISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - IntruductionISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - Intruduction
 
Top 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual TestersTop 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual Testers
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Unit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual StudioUnit testing basics with NUnit and Visual Studio
Unit testing basics with NUnit and Visual Studio
 
ISTQB Eğitim Sunumu
ISTQB Eğitim SunumuISTQB Eğitim Sunumu
ISTQB Eğitim Sunumu
 
Formal method
Formal methodFormal method
Formal method
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
Manual testing
Manual testingManual testing
Manual testing
 
Software testing
Software testingSoftware testing
Software testing
 
Automated Testing DITA Content and Customizations
Automated Testing DITA Content and CustomizationsAutomated Testing DITA Content and Customizations
Automated Testing DITA Content and Customizations
 
Intro to Manual Testing
Intro to Manual TestingIntro to Manual Testing
Intro to Manual Testing
 
Software Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | EdurekaSoftware Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | Edureka
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
 
Automation testing interview pdf org
Automation testing interview pdf orgAutomation testing interview pdf org
Automation testing interview pdf org
 
Testing a GPS application | Testbytes
Testing a GPS application | TestbytesTesting a GPS application | Testbytes
Testing a GPS application | Testbytes
 

Destacado

Agile for game_development
Agile for game_developmentAgile for game_development
Agile for game_developmentJoe Chavez
 
Single Content Streams
Single Content StreamsSingle Content Streams
Single Content StreamsJoe Chavez
 
Social Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM SummitSocial Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM SummitJoe Chavez
 
Subversion Tech Report (2006)
Subversion Tech Report (2006)Subversion Tech Report (2006)
Subversion Tech Report (2006)Joe Chavez
 
Licences Libres et Artistes
Licences Libres et ArtistesLicences Libres et Artistes
Licences Libres et ArtistesOPEN21
 
AMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room VisualizationAMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room VisualizationIdeance
 
Ignite Reno #14- What in the Wearable?
Ignite Reno #14- What in the Wearable?Ignite Reno #14- What in the Wearable?
Ignite Reno #14- What in the Wearable?Joe Chavez
 

Destacado (8)

Agile for game_development
Agile for game_developmentAgile for game_development
Agile for game_development
 
Single Content Streams
Single Content StreamsSingle Content Streams
Single Content Streams
 
Social Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM SummitSocial Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM Summit
 
Subversion Tech Report (2006)
Subversion Tech Report (2006)Subversion Tech Report (2006)
Subversion Tech Report (2006)
 
julie
juliejulie
julie
 
Licences Libres et Artistes
Licences Libres et ArtistesLicences Libres et Artistes
Licences Libres et Artistes
 
AMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room VisualizationAMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room Visualization
 
Ignite Reno #14- What in the Wearable?
Ignite Reno #14- What in the Wearable?Ignite Reno #14- What in the Wearable?
Ignite Reno #14- What in the Wearable?
 

Similar a Patterns in Testing

Implementing TDD in for .net Core applications
Implementing TDD in for .net Core applicationsImplementing TDD in for .net Core applications
Implementing TDD in for .net Core applicationsAhmad Kazemi
 
Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Grig Gheorghiu
 
Google test training
Google test trainingGoogle test training
Google test trainingThierry Gayet
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2Tricode (part of Dept)
 
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...Erika Barron
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testinggueste1e4db
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsQuontra Solutions
 
Automated Unit Testing for Mere Mortals
Automated Unit Testing for Mere MortalsAutomated Unit Testing for Mere Mortals
Automated Unit Testing for Mere MortalsJess Chadwick
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented TestingAMITJain879
 
justin presentation upload PPT june 19
justin presentation upload PPT june 19justin presentation upload PPT june 19
justin presentation upload PPT june 19techweb08
 

Similar a Patterns in Testing (20)

Implementing TDD in for .net Core applications
Implementing TDD in for .net Core applicationsImplementing TDD in for .net Core applications
Implementing TDD in for .net Core applications
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
 
Google test training
Google test trainingGoogle test training
Google test training
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
Unit test Android
Unit test AndroidUnit test Android
Unit test Android
 
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...
 
Unit testing, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testing
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
Automated Unit Testing for Mere Mortals
Automated Unit Testing for Mere MortalsAutomated Unit Testing for Mere Mortals
Automated Unit Testing for Mere Mortals
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
Paper CS
Paper CSPaper CS
Paper CS
 
alkatest7
alkatest7alkatest7
alkatest7
 
justin presentation upload PPT june 19
justin presentation upload PPT june 19justin presentation upload PPT june 19
justin presentation upload PPT june 19
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 

Patterns in Testing

  • 1. for Code, Components and Systems Patterns In Testing
  • 2. overview Why write tests? Purist vs. Practitioner New Code vs. Legacy Code Unit Testing Functional Testing User Driven Testing Test Automation Ecosystem 5/20/2010 Presented by Joe Chavez
  • 3. Why write tests? 5/20/2010 Presented by Joe Chavez Catch defects during implementation Software testing is not the same as hardware testing More moving parts Documentation is often stale or non-existent Tests provide opportunity to document the intent of a class, component or system with working code Once written, tests are repeatable with very little overhead Test help a team maintain and more importantly change code with reduced risk Software tests can drive hardware testing Automated tools cannot capture the intent of the code – especially dynamic intent These tools complement the coding of tests, not replace
  • 4. PURIST vs. Practitioner 5/20/2010 Presented by Joe Chavez
  • 5. PURIST vs. Practitioner Balance achieved with Pragmatism Context is key Type of code: new, legacy, generated, etc. Robustness of tools Complexity of design Developer skillset Management support Perception is often that writing test code is not contributing to the bottom line Reality a few tests now can save time during the integration/delivery phases of a project 5/20/2010 Presented by Joe Chavez
  • 6. New Code vs. Legacy Code New Code Can benefit greatly from a Test Driven approach Identify critical areas in the requirements/design that deliver most value Typically can use the best of breed testing tools & frameworks Legacy Code Improve – White box with Test Driven approach Incorporate – Characterize actual behavior in isolation Rewrite – Analyze existing code and write tests as part of new code Pair programming is helpful Can work in code review mode while writing tests Ideal situation: original programmer is part of the pair 5/20/2010 Presented by Joe Chavez
  • 7. New Code vs. Legacy Code Special Cases: Open Source Usually come with a test suite – use caution if there is no test suite Generated Code For C/C++ - characterize memory management Explore usage of generated code through writing tests 5/20/2010 Presented by Joe Chavez
  • 8. Unit Testing Single Purpose Testing Focused on public methods of a class View through the caller eyes Typically one (1) assertion check for pass/fail Code scenarios to verify correct behavior under normal and abusive conditions Testing Frameworks C# - NUnit C++ - UnitTest++ Java – jUnit Mocking Frameworks 5/20/2010 Presented by Joe Chavez
  • 9. Functional Testing Verify the integration of several components and/or classes Use same testing framework that unit tests use Good for integration testing new/legacy/open source/generated code Verification scenarios Data flow between components Actual vs. expected results at each stage Use case scenarios 5/20/2010 Presented by Joe Chavez
  • 10. USER Driven Testing Data Driven System A system that can be configured for execution based on an input data set and will produced an expected set of output data Test Application May require development of a test application – typically a console application Accepts file based input and/or command line options Produces file based output 5/20/2010 Presented by Joe Chavez
  • 11. Test Automation Run tests early and often Integrate into the development/build process Visual Studio post build event msbuild/ant/make scripts Continuous Integration support Silent success and error on failure If all tests succeed then report silently (X number of test passed) If any test fails then fail the build Report failed test with a context (i.e. failed assertion, stack trace) Take corrective action before moving on 5/20/2010 Presented by Joe Chavez
  • 12. IN CONTEXT 5/20/2010 Presented by Joe Chavez