SlideShare a Scribd company logo
1 of 18
Unit Testing and Tools
Wm. Barrett Simms
barrett@wbsimms.com
@wbsimms
Sponsor Thanks!
About Me
Software
Developer
Agile Team
Member
Team Lead
Agile
Advocate
SDLC
Implementer
What are your variable costs?
Requirements Quality Defects / Testing
Technical Skill Infrastructure
These are under
your control
The measurement process
Take
Action
Identify
Problems
Measure
SDLC
Vocabulary
• Unit test
• Code you write to test your code
• Coverage
• Measure of how much code is tested
• Mock
• Replacement for something else
• Dependency Injection (DI)
• Builder design pattern
• Object and dependencies are created for you
• Continuous Integration (CI)
• Responds to check-ins, builds code, and generates code metrics (coverage, unit test pass fail, etc.)
Why Unit Test?
• Which would you rather do?
Write Code
Manual Testing
&
Fix Bugs
That’s cute… but really…
• Catches regression bugs at the developers desk
• Documents how code works
• Catalog of the business rules
What makes a good unit test?
• Repeatable
• Fast
• Test by layers
• Good Coverage
Test by layers
Component
Sub-component 1 Sub-component 2
Sub-component 3Sub-component 4
Sub-component 1 Mock Sub-component 2
Mock Sub-component 4
When do you run your test?
•All tests all the time!
 After pull / sync
 Before commits
 During CI builds
 Before you merge
 After you merge
Excuses
• It takes too long to write
• It takes too long to run
• It’s not my job
• I don’t understand how the code is supposed to behave so I can’t
test it
It takes too long
My toolset
• MSTest
• Unit testing framework
• Moq
• Creating mock objects from interfaces
• Unity
• Dependency Injection
• MSBuild
• Build automation
• Ncover
• For coverage analysis
Base Project
• Project Roller
• https://github.com/wbsimms/ProjectRoller
• ASP.NET MVC 5.x
• EF 6.x
• Unity Dependency Injection 4.x
• Angular 1.5
• Bootstrap
• Moq
• Complete build system
• MSBuild
• Ncover
• Simian
• Database creation and seeding
• More…
Demo
Deep breath…

More Related Content

What's hot

Developer + tester = quality++
Developer + tester = quality++Developer + tester = quality++
Developer + tester = quality++Mikalai Alimenkou
 
Test-driven development with Node.js
Test-driven development with Node.jsTest-driven development with Node.js
Test-driven development with Node.jsMirko Kiefer
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013SmartBear
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingSahar Nofal
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gaugevodqancr
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!Mikalai Alimenkou
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseNarayanan Palani
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham.NET Conf UY
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...AgileNetwork
 
Win at life with unit testing
Win at life with unit testingWin at life with unit testing
Win at life with unit testingmarkstory
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Leonard Fingerman
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqXPDays
 

What's hot (20)

Developer + tester = quality++
Developer + tester = quality++Developer + tester = quality++
Developer + tester = quality++
 
Test-driven development with Node.js
Test-driven development with Node.jsTest-driven development with Node.js
Test-driven development with Node.js
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gauge
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!
 
Benefits from AATs
Benefits from AATsBenefits from AATs
Benefits from AATs
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
 
Agile methodologies
Agile methodologiesAgile methodologies
Agile methodologies
 
Win at life with unit testing
Win at life with unit testingWin at life with unit testing
Win at life with unit testing
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI
 
Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016
 
Unit Testing talk
Unit Testing talkUnit Testing talk
Unit Testing talk
 
Agile test practices
Agile test practicesAgile test practices
Agile test practices
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and Moq
 

Viewers also liked

Show me the problem- Our insights journey at Netflix
Show me the problem- Our insights journey at NetflixShow me the problem- Our insights journey at Netflix
Show me the problem- Our insights journey at NetflixSuudhan Rangarajan
 
Terms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedTerms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedclintongormley
 
What's new in Elasticsearch v5
What's new in Elasticsearch v5What's new in Elasticsearch v5
What's new in Elasticsearch v5Idan Tohami
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning ElasticsearchAnurag Patel
 
ElasticSearch for data mining
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining William Simms
 
Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...clintongormley
 
Scaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with ElasticsearchScaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with Elasticsearchclintongormley
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life琛琳 饶
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaAmazee Labs
 
Moving From MySQL to Elasticsearch for Analytics
Moving From MySQL to Elasticsearch for AnalyticsMoving From MySQL to Elasticsearch for Analytics
Moving From MySQL to Elasticsearch for AnalyticsPercolate
 
Data modeling for Elasticsearch
Data modeling for ElasticsearchData modeling for Elasticsearch
Data modeling for ElasticsearchFlorian Hopf
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Viewers also liked (16)

Campaign Technology
Campaign TechnologyCampaign Technology
Campaign Technology
 
Show me the problem- Our insights journey at Netflix
Show me the problem- Our insights journey at NetflixShow me the problem- Our insights journey at Netflix
Show me the problem- Our insights journey at Netflix
 
Elasticsearch 5.0
Elasticsearch 5.0Elasticsearch 5.0
Elasticsearch 5.0
 
Terms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explainedTerms of endearment - the ElasticSearch Query DSL explained
Terms of endearment - the ElasticSearch Query DSL explained
 
What's new in Elasticsearch v5
What's new in Elasticsearch v5What's new in Elasticsearch v5
What's new in Elasticsearch v5
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
 
ElasticSearch for data mining
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining
 
Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...
 
Scaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with ElasticsearchScaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with Elasticsearch
 
Logstash
LogstashLogstash
Logstash
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Elk stack
Elk stackElk stack
Elk stack
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
 
Moving From MySQL to Elasticsearch for Analytics
Moving From MySQL to Elasticsearch for AnalyticsMoving From MySQL to Elasticsearch for Analytics
Moving From MySQL to Elasticsearch for Analytics
 
Data modeling for Elasticsearch
Data modeling for ElasticsearchData modeling for Elasticsearch
Data modeling for Elasticsearch
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Unit Testing and Tools - ADNUG

Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testPeter Lindberg
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationhugo lu
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit TestingShaun Abram
 
ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0Samer Desouky
 
Design for Testability in Practice
Design for Testability in PracticeDesign for Testability in Practice
Design for Testability in PracticeTechWell
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool EvaluationKate Semizhon
 
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Malinda Kapuruge
 
A Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityA Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityJeff Bramwell
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle ManagementAmazon Web Services
 
Critical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WayCritical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WaySmartBear
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Steven Smith
 
Microsoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable CodeMicrosoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable CodeAleksandar Bozinovski
 

Similar to Unit Testing and Tools - ADNUG (20)

Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Udvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load testUdvid din test portefølje med coded ui test og cloud load test
Udvid din test portefølje med coded ui test og cloud load test
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0
 
Design for Testability in Practice
Design for Testability in PracticeDesign for Testability in Practice
Design for Testability in Practice
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Agile testing
Agile testingAgile testing
Agile testing
 
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.
 
A Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityA Roadmap to Enterprise Quality
A Roadmap to Enterprise Quality
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Critical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right WayCritical Capabilities to Shifting Left the Right Way
Critical Capabilities to Shifting Left the Right Way
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016
 
Microsoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable CodeMicrosoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable Code
 
Unit Tests with Microsoft Fakes
Unit Tests with Microsoft FakesUnit Tests with Microsoft Fakes
Unit Tests with Microsoft Fakes
 

More from William Simms

Big Data Overview Part 1
Big Data Overview Part 1Big Data Overview Part 1
Big Data Overview Part 1William Simms
 
Continuous Integration - Step by Step
Continuous Integration - Step by StepContinuous Integration - Step by Step
Continuous Integration - Step by StepWilliam Simms
 
Software Development And Delivery Metrics That Matter
Software Development And Delivery Metrics That MatterSoftware Development And Delivery Metrics That Matter
Software Development And Delivery Metrics That MatterWilliam Simms
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to AgileWilliam Simms
 
Introduction to scrum
Introduction to scrumIntroduction to scrum
Introduction to scrumWilliam Simms
 

More from William Simms (7)

Big Data Overview Part 1
Big Data Overview Part 1Big Data Overview Part 1
Big Data Overview Part 1
 
Bootstrap Bootcamp
Bootstrap BootcampBootstrap Bootcamp
Bootstrap Bootcamp
 
Continuous Integration - Step by Step
Continuous Integration - Step by StepContinuous Integration - Step by Step
Continuous Integration - Step by Step
 
Software Development And Delivery Metrics That Matter
Software Development And Delivery Metrics That MatterSoftware Development And Delivery Metrics That Matter
Software Development And Delivery Metrics That Matter
 
AWS vs Azure
AWS vs AzureAWS vs Azure
AWS vs Azure
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to Agile
 
Introduction to scrum
Introduction to scrumIntroduction to scrum
Introduction to scrum
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Unit Testing and Tools - ADNUG

  • 1. Unit Testing and Tools Wm. Barrett Simms barrett@wbsimms.com @wbsimms
  • 3.
  • 4. About Me Software Developer Agile Team Member Team Lead Agile Advocate SDLC Implementer
  • 5. What are your variable costs? Requirements Quality Defects / Testing Technical Skill Infrastructure These are under your control
  • 8. Vocabulary • Unit test • Code you write to test your code • Coverage • Measure of how much code is tested • Mock • Replacement for something else • Dependency Injection (DI) • Builder design pattern • Object and dependencies are created for you • Continuous Integration (CI) • Responds to check-ins, builds code, and generates code metrics (coverage, unit test pass fail, etc.)
  • 9. Why Unit Test? • Which would you rather do? Write Code Manual Testing & Fix Bugs
  • 10. That’s cute… but really… • Catches regression bugs at the developers desk • Documents how code works • Catalog of the business rules
  • 11. What makes a good unit test? • Repeatable • Fast • Test by layers • Good Coverage
  • 12. Test by layers Component Sub-component 1 Sub-component 2 Sub-component 3Sub-component 4 Sub-component 1 Mock Sub-component 2 Mock Sub-component 4
  • 13. When do you run your test? •All tests all the time!  After pull / sync  Before commits  During CI builds  Before you merge  After you merge
  • 14. Excuses • It takes too long to write • It takes too long to run • It’s not my job • I don’t understand how the code is supposed to behave so I can’t test it
  • 15. It takes too long
  • 16. My toolset • MSTest • Unit testing framework • Moq • Creating mock objects from interfaces • Unity • Dependency Injection • MSBuild • Build automation • Ncover • For coverage analysis
  • 17. Base Project • Project Roller • https://github.com/wbsimms/ProjectRoller • ASP.NET MVC 5.x • EF 6.x • Unity Dependency Injection 4.x • Angular 1.5 • Bootstrap • Moq • Complete build system • MSBuild • Ncover • Simian • Database creation and seeding • More…

Editor's Notes

  1. Welcome!
  2. Focus on technical product delivery
  3. The things you can control!