SlideShare a Scribd company logo
for Code, Components and SystemsPatterns In Testing
overviewWhy write tests?Purist vs. PractitionerNew Code vs. Legacy CodeUnit TestingFunctional TestingUser Driven TestingTest AutomationEcosystem5/20/2010Presented by Joe Chavez
Why write tests?5/20/2010Presented by Joe ChavezCatch defects during implementationSoftware testing is not the same as hardware testingMore moving partsDocumentation is often stale or non-existentTests provide opportunity to document the intent of a class, component or system with working codeOnce written, tests are repeatable with very little overheadTest help a team maintain and more importantly change code with reduced riskSoftware tests can drive hardware testingAutomated tools cannot capture the intent of the code – especially dynamic intentThese tools complement the coding of tests, not replace
PURIST vs. Practitioner5/20/2010Presented by Joe Chavez
PURIST vs. PractitionerBalance achieved with PragmatismContext is keyType of code: new, legacy, generated, etc.Robustness of toolsComplexity of designDeveloper skillsetManagement supportPerception is often that writing test code is not contributing to the bottom lineReality a few tests now can save time during the integration/delivery phases of a project5/20/2010Presented by Joe Chavez
New Code vs. Legacy CodeNew CodeCan benefit greatly from a Test Driven approachIdentify critical areas in the requirements/design that deliver most valueTypically can use the best of breed testing tools & frameworksLegacy CodeImprove – White box with Test Driven approachIncorporate – Characterize actual behavior in isolationRewrite – Analyze existing code and write tests as part of new codePair programming is helpfulCan work in code review mode while writing testsIdeal situation: original programmer is part of the pair5/20/2010Presented by Joe Chavez
New Code vs. Legacy CodeSpecial Cases:Open SourceUsually come with a test suite – use caution if there is no test suiteGenerated Code For C/C++ - characterize memory managementExplore usage of generated code through writing tests5/20/2010Presented by Joe Chavez
Unit TestingSingle Purpose TestingFocused on public methods of a class View through the caller eyesTypically one (1) assertion check for pass/failCode scenarios to verify correct behavior under normal and abusive conditionsTesting FrameworksC# - NUnitC++ - UnitTest++Java – jUnitMocking Frameworks5/20/2010Presented by Joe Chavez
Functional TestingVerify the integration of several components and/or classesUse same testing framework that unit tests useGood for integration testing new/legacy/open source/generated codeVerification scenariosData flow between componentsActual vs. expected results at each stageUse case scenarios5/20/2010Presented by Joe Chavez
USER Driven TestingData Driven SystemA system that can be configured for execution based on an input data set and will produced an expected set of output dataTest ApplicationMay require development of a test application – typically a console applicationAccepts file based input and/or command line optionsProduces file based output5/20/2010Presented by Joe Chavez
Test AutomationRun tests early and oftenIntegrate into the development/build processVisual Studio post build eventmsbuild/ant/make scriptsContinuous Integration supportSilent success and error on failureIf all tests succeed then report silently (X number of test passed)If any test fails then fail the buildReport failed test with a context (i.e. failed assertion, stack trace)Take corrective action before moving on5/20/2010Presented by Joe Chavez
IN CONTEXT5/20/2010Presented by Joe Chavez

More Related Content

PPT
Unit testing
PPTX
PPTX
Software testing tools (free and open source)
PDF
Software Testing without Requirements: Survival Guide
PPT
Unit Testing
PPTX
Qa mockup interview for automation testing
PPT
Testing concepts ppt
PDF
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Unit testing
Software testing tools (free and open source)
Software Testing without Requirements: Survival Guide
Unit Testing
Qa mockup interview for automation testing
Testing concepts ppt
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...

What's hot (20)

PPS
Unit Testing
PPTX
Automation frameworks
PDF
Testing Tools
PPTX
ISTQB Foundation Level Certification - Intruduction
PPTX
Top 15 Interview Questions for Manual Testers
PPT
Automated Testing vs Manual Testing
PPTX
Unit testing basics with NUnit and Visual Studio
PPTX
ISTQB Eğitim Sunumu
PPTX
Formal method
PPTX
Software Testing or Quality Assurance
PPTX
Type mock isolator
PPSX
Manual testing
PPTX
Software testing
PPT
Automated Testing DITA Content and Customizations
PPTX
Intro to Manual Testing
PDF
Software Testing Interview Questions & Answers | Edureka
PPTX
Testing JavaScript Applications
DOCX
Testing concept definition
PDF
Automation testing interview pdf org
PDF
Testing a GPS application | Testbytes
Unit Testing
Automation frameworks
Testing Tools
ISTQB Foundation Level Certification - Intruduction
Top 15 Interview Questions for Manual Testers
Automated Testing vs Manual Testing
Unit testing basics with NUnit and Visual Studio
ISTQB Eğitim Sunumu
Formal method
Software Testing or Quality Assurance
Type mock isolator
Manual testing
Software testing
Automated Testing DITA Content and Customizations
Intro to Manual Testing
Software Testing Interview Questions & Answers | Edureka
Testing JavaScript Applications
Testing concept definition
Automation testing interview pdf org
Testing a GPS application | Testbytes
Ad

Viewers also liked (8)

PPTX
Agile for game_development
KEY
Single Content Streams
PPTX
Social Media Patterns 2010 NIM Summit
PDF
Subversion Tech Report (2006)
PDF
Licences Libres et Artistes
PPT
AMS Asclepius - Operating Room Visualization
PPTX
Ignite Reno #14- What in the Wearable?
Agile for game_development
Single Content Streams
Social Media Patterns 2010 NIM Summit
Subversion Tech Report (2006)
Licences Libres et Artistes
AMS Asclepius - Operating Room Visualization
Ignite Reno #14- What in the Wearable?
Ad

Similar to Patterns in Testing (20)

PDF
Software testing: an introduction - 2017
PPTX
{10.0} Test Driven Development.pptx
PDF
Let's test!
PDF
Testing Plug-in Architectures
PDF
Driving Quality with TDD
PDF
Testing: an Introduction and Panorama
PPTX
WeActuallyBuildStuff - Extreme Programming Live
PDF
Testing In Agile
PPTX
Testing 101
PPT
Software Testing 1198102207476437 4
PPT
Software Testing
PPT
Software Engineering (Testing Overview)
PPTX
Unit Testing and TDD 2017
PPTX
CCS366 Softwares Testing Automation.pptx
PDF
Introduction to Automated Testing
PDF
Introduction to-automated-testing
PPT
Software Engineering Lec 10 -software testing--
PPTX
SOFTWARE Engineering (SOFTWARE TESTING).pptx
PPTX
NET Code Testing
PPTX
unit 4.pptx very needful and important p
Software testing: an introduction - 2017
{10.0} Test Driven Development.pptx
Let's test!
Testing Plug-in Architectures
Driving Quality with TDD
Testing: an Introduction and Panorama
WeActuallyBuildStuff - Extreme Programming Live
Testing In Agile
Testing 101
Software Testing 1198102207476437 4
Software Testing
Software Engineering (Testing Overview)
Unit Testing and TDD 2017
CCS366 Softwares Testing Automation.pptx
Introduction to Automated Testing
Introduction to-automated-testing
Software Engineering Lec 10 -software testing--
SOFTWARE Engineering (SOFTWARE TESTING).pptx
NET Code Testing
unit 4.pptx very needful and important p

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”

Patterns in Testing

  • 1. for Code, Components and SystemsPatterns In Testing
  • 2. overviewWhy write tests?Purist vs. PractitionerNew Code vs. Legacy CodeUnit TestingFunctional TestingUser Driven TestingTest AutomationEcosystem5/20/2010Presented by Joe Chavez
  • 3. Why write tests?5/20/2010Presented by Joe ChavezCatch defects during implementationSoftware testing is not the same as hardware testingMore moving partsDocumentation is often stale or non-existentTests provide opportunity to document the intent of a class, component or system with working codeOnce written, tests are repeatable with very little overheadTest help a team maintain and more importantly change code with reduced riskSoftware tests can drive hardware testingAutomated tools cannot capture the intent of the code – especially dynamic intentThese tools complement the coding of tests, not replace
  • 5. PURIST vs. PractitionerBalance achieved with PragmatismContext is keyType of code: new, legacy, generated, etc.Robustness of toolsComplexity of designDeveloper skillsetManagement supportPerception is often that writing test code is not contributing to the bottom lineReality a few tests now can save time during the integration/delivery phases of a project5/20/2010Presented by Joe Chavez
  • 6. New Code vs. Legacy CodeNew CodeCan benefit greatly from a Test Driven approachIdentify critical areas in the requirements/design that deliver most valueTypically can use the best of breed testing tools & frameworksLegacy CodeImprove – White box with Test Driven approachIncorporate – Characterize actual behavior in isolationRewrite – Analyze existing code and write tests as part of new codePair programming is helpfulCan work in code review mode while writing testsIdeal situation: original programmer is part of the pair5/20/2010Presented by Joe Chavez
  • 7. New Code vs. Legacy CodeSpecial Cases:Open SourceUsually come with a test suite – use caution if there is no test suiteGenerated Code For C/C++ - characterize memory managementExplore usage of generated code through writing tests5/20/2010Presented by Joe Chavez
  • 8. Unit TestingSingle Purpose TestingFocused on public methods of a class View through the caller eyesTypically one (1) assertion check for pass/failCode scenarios to verify correct behavior under normal and abusive conditionsTesting FrameworksC# - NUnitC++ - UnitTest++Java – jUnitMocking Frameworks5/20/2010Presented by Joe Chavez
  • 9. Functional TestingVerify the integration of several components and/or classesUse same testing framework that unit tests useGood for integration testing new/legacy/open source/generated codeVerification scenariosData flow between componentsActual vs. expected results at each stageUse case scenarios5/20/2010Presented by Joe Chavez
  • 10. USER Driven TestingData Driven SystemA system that can be configured for execution based on an input data set and will produced an expected set of output dataTest ApplicationMay require development of a test application – typically a console applicationAccepts file based input and/or command line optionsProduces file based output5/20/2010Presented by Joe Chavez
  • 11. Test AutomationRun tests early and oftenIntegrate into the development/build processVisual Studio post build eventmsbuild/ant/make scriptsContinuous Integration supportSilent success and error on failureIf all tests succeed then report silently (X number of test passed)If any test fails then fail the buildReport failed test with a context (i.e. failed assertion, stack trace)Take corrective action before moving on5/20/2010Presented by Joe Chavez