SlideShare a Scribd company logo
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

More Related Content

What's hot

Unit Testing
Unit TestingUnit Testing
Unit Testing
Anuj Arora
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
Vishwanath KC
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
Ted Husted
 
ISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - IntruductionISTQB Foundation Level Certification - Intruduction
ISTQB Foundation Level Certification - Intruduction
QA 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 Testers
Sarah Elson
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
didev
 
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
Amit Choudhary
 
ISTQB Eğitim Sunumu
ISTQB Eğitim SunumuISTQB Eğitim Sunumu
ISTQB Eğitim Sunumu
Mesut Güneş
 
Formal method
Formal methodFormal method
Formal method
Sara Malik
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
Trimantra Software Solutions
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
MaslowB
 
Manual testing
Manual testingManual testing
Manual testing
vigneshasromio
 
Software testing
Software testingSoftware testing
Software testing
Abhishek Gautam
 
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
 
Intro to Manual Testing
Intro to Manual TestingIntro to Manual Testing
Intro to Manual Testing
Ayah Soufan
 
Software Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | EdurekaSoftware Testing Interview Questions & Answers | Edureka
Software Testing Interview Questions & Answers | Edureka
Edureka!
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
Muhammad Samu
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
Vivek V
 
Automation testing interview pdf org
Automation testing interview pdf orgAutomation testing interview pdf org
Automation testing interview pdf org
Testbytes
 
Testing a GPS application | Testbytes
Testing a GPS application | TestbytesTesting a GPS application | Testbytes
Testing a GPS application | Testbytes
Testbytes
 

What's hot (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
 

Viewers also liked

Agile for game_development
Agile for game_developmentAgile for game_development
Agile for game_development
Joe Chavez
 
Single Content Streams
Single Content StreamsSingle Content Streams
Single Content Streams
Joe Chavez
 
Social Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM SummitSocial Media Patterns 2010 NIM Summit
Social Media Patterns 2010 NIM Summit
Joe Chavez
 
Subversion Tech Report (2006)
Subversion Tech Report (2006)Subversion Tech Report (2006)
Subversion Tech Report (2006)
Joe Chavez
 
julie
juliejulie
Licences Libres et Artistes
Licences Libres et ArtistesLicences Libres et Artistes
Licences Libres et Artistes
OPEN21
 
AMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room VisualizationAMS Asclepius - Operating Room Visualization
AMS Asclepius - Operating Room Visualization
Ideance
 
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
 

Viewers also liked (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 to 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 applications
Ahmad Kazemi
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
priya_trivedi
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
Priya Sharma
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
priya_trivedi
 
Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
Grig Gheorghiu
 
Google test training
Google test trainingGoogle test training
Google test training
Thierry 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_v2
Tricode (part of Dept)
 
Unit test Android
Unit test AndroidUnit test Android
Unit test Android
Qushay Bagas
 
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, principles
Unit testing, principlesUnit testing, principles
Unit testing, principles
Renato Primavera
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
Homa Pourmohammadi
 
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+Testing
gueste1e4db
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
Directi Group
 
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
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
AMITJain879
 
Paper CS
Paper CSPaper CS
Paper CS
techweb08
 
alkatest7
alkatest7alkatest7
alkatest7
techweb08
 
justin presentation upload PPT june 19
justin presentation upload PPT june 19justin presentation upload PPT june 19
justin presentation upload PPT june 19
techweb08
 

Similar to 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
 

Recently uploaded

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 

Recently uploaded (20)

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.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