SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
MaslowB
 
Automated Testing DITA Content and Customizations
Automated Testing DITA Content and CustomizationsAutomated Testing DITA Content and Customizations
Automated Testing DITA Content and Customizations
Steve Anderson
 

Was ist angesagt? (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
 

Andere mochten auch

Single Content Streams
Single Content StreamsSingle Content Streams
Single Content Streams
Joe Chavez
 

Andere mochten auch (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?
 

Ähnlich wie Patterns in Testing

Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
Grig Gheorghiu
 
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
Tricode (part of Dept)
 
Automated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+TestingAutomated+Testing+Vs+Manual+Testing
Automated+Testing+Vs+Manual+Testing
gueste1e4db
 
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
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
Jess Chadwick
 
justin presentation upload PPT june 19
justin presentation upload PPT june 19justin presentation upload PPT june 19
justin presentation upload PPT june 19
techweb08
 

Ähnlich wie 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
 

Kürzlich hochgeladen

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
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

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