SlideShare a Scribd company logo
1 of 27
SOFTWARE TESTING
Everyone’s Responsibility
Kurt Bliefernich
How can you know your code
works? That’s easy. Test it.
Test it again. Test it up. Test it
down. Test it seven ways to
Sunday.
~ Clean Coder Robert C. Martin
(Uncle Bob)
Isn’t Software Testing Expensive?
• Long Regression Cycles
• Time to write tests
• Lack of feature development
Cost Savings
1,000 hours of up-front
implementation without TDD.
TDD saved 623 man hours, or,
for a team of 4, about a month
of development.
Here are the assumptions made:
• Production bugs without TDD: 100
• Production bugs with TDD: 40 (60%
fewer, middle ground between 40%—
80%)
• Average time to fix bug at
implementation (TDD) phase: 1 hour
(this number is only used to derive the
production bug fix cost)
• Average time to fix a production bug:
~15 hours
Testing Saves Money
• Automate Regression
• Write lots of smaller tests
• Retire redundant tests
• Less code rewrite because of bugs
• Easier to refactor, grow code
The Testing Ice Cream Cone
• This is an Anti-pattern
• Sometimes called Testing
Cupcake.
The Testing Pyramid
• Write lots of fast tests,
near 100% coverage
• Push exception testing
down the pyramid
• Automate your happy
path, full stack tests
• Let QA specialists do
what they do best
(AdHoc, Exploratory, etc.)
The Testing Pyramid
• Technology Facing Tests
== Developer
Responsibility
• Business Facing Tests ==
QA && Product
Responsibility
• Best, QA and Developers
cross pair and write tests
Unit tests are low-level, focusing on a
small part of the software system.
Unit tests are written by the
programmers themselves using their
regular tools - the only difference being
the use of some sort of unit testing
framework.
Unit tests are expected to be
significantly faster than other kinds of
tests.
https://martinfowler.com/bliki/UnitTest.html
A component test is a test
that limits the scope of the
exercised software to a
portion of the system
under test.
https://martinfowler.com/bliki/ComponentTest.html
An integration test takes
a small group of units,
often two units, and
tests their behavior as a
whole, verifying that
they coherently work
together.
https://testing.googleblog.com/2015/
04/just-say-no-to-more-end-to-end-
tests.html
Contract/Consumer Tests
Contracts should be about catching:
• Bugs in the consumer
• Misunderstanding from the consumer
about end-points or payload
• Breaking changes by the provider on
end-points or payload
https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html
Automated
GUI Testing
Automated UI Testing
• Should cover sunny day scenarios
• Testing through the UI is slow,
increasing build times.
• Most importantly such tests are very
brittle.
Test DrivenDevelopmentDesign
1. You are not allowed to write any production
code until you first written a failing unit test.
2. You are not allowed to write more of a unit
test than is sufficient to fail – and not
compiling is failing.
3. You are not allowed to write more
production code that is sufficient to pass the
currently failing unit test.
Use Expressive Tests
JUnit & AssertJ
Testing Terminology - Doubles
Test Double is the generic
term for any kind of
pretend object used in
place of a real object for
testing purposes.
Testing Terminology - Doubles
Dummy objects are
passed around but never
actually used. Usually they
are just used to fill
parameter lists.
Testing Terminology - Doubles
Fake objects actually have
working implementations,
but usually take some
shortcut which makes them
not suitable for production.
Testing Terminology - Doubles
Stubs provide canned answers to
calls made during the test, usually
not responding at all to anything
outside what's programmed in for
the test.
Testing Terminology - Doubles
Mocks are objects pre-
programmed with
expectations which form a
specification of the calls they
are expected to receive.
Testing Terminology - Doubles
Spies are mock objects, as
they record what is called.
They allow for real methods to
be called when they are not
mocked.
Recommended Books
References and Links
• https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks
• https://martinfowler.com/articles/mocksArentStubs.html
• https://www.amazon.com/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073
• https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html
• https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html
• https://watirmelon.blog/
• https://www.researchgate.net/publication/255965523_Integrating_Software_Assurance_into_the_Software
_Development_Life_Cycle_SDLC
• https://medium.com/javascript-scene/the-outrageous-cost-of-skipping-tdd-code-reviews-57887064c412
• https://www.thoughtworks.com/insights/blog/introducing-software-testing-cupcake-anti-pattern
Questions ??

More Related Content

What's hot

Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Agile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengAgile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengExcella
 
Test driven development
Test driven developmentTest driven development
Test driven developmentHarry Potter
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
Qa process 2012
Qa process 2012Qa process 2012
Qa process 2012ashokack
 
Testing automation in agile environment
Testing automation in agile environmentTesting automation in agile environment
Testing automation in agile environmentPerfecto Mobile
 
A Concise QA Process
A Concise QA Process A Concise QA Process
A Concise QA Process Arslan Ali
 
Release Automation: Better Quality, Faster Deployment, Amazing ROI
Release Automation: Better Quality, Faster Deployment, Amazing ROIRelease Automation: Better Quality, Faster Deployment, Amazing ROI
Release Automation: Better Quality, Faster Deployment, Amazing ROITechWell
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineDevOps.com
 
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimPerformance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimJAXLondon2014
 
How do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingHow do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingThoughtworks
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarGiel Tettelaar
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 

What's hot (15)

Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Agile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengAgile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard Cheng
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Qa process 2012
Qa process 2012Qa process 2012
Qa process 2012
 
Testing automation in agile environment
Testing automation in agile environmentTesting automation in agile environment
Testing automation in agile environment
 
Test pyramid
Test pyramidTest pyramid
Test pyramid
 
A Concise QA Process
A Concise QA Process A Concise QA Process
A Concise QA Process
 
Release Automation: Better Quality, Faster Deployment, Amazing ROI
Release Automation: Better Quality, Faster Deployment, Amazing ROIRelease Automation: Better Quality, Faster Deployment, Amazing ROI
Release Automation: Better Quality, Faster Deployment, Amazing ROI
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the Pipeline
 
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimPerformance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
 
How do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingHow do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated Testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 

Similar to Software Testing, Everyone's responsibility

Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
How to scale your Test Automation
How to scale your Test AutomationHow to scale your Test Automation
How to scale your Test AutomationKlaus Salchner
 
Test driven development
Test driven developmentTest driven development
Test driven developmentLuis Goldster
 
Test driven development
Test driven developmentTest driven development
Test driven developmentTony Nguyen
 
Test driven development
Test driven developmentTest driven development
Test driven developmentYoung Alista
 
Test driven development
Test driven developmentTest driven development
Test driven developmentJames Wong
 
Test driven development
Test driven developmentTest driven development
Test driven developmentFraboni Ec
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptxmianshafa
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentZendCon
 
Test driven development
Test driven developmentTest driven development
Test driven developmentSunil Prasad
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Scrum and-xp-from-the-trenches 06 testing
Scrum and-xp-from-the-trenches 06 testingScrum and-xp-from-the-trenches 06 testing
Scrum and-xp-from-the-trenches 06 testingHossam Hassan
 
Automated testing vs manual testing
Automated testing vs manual testingAutomated testing vs manual testing
Automated testing vs manual testingNeha Polke
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...TEST Huddle
 

Similar to Software Testing, Everyone's responsibility (20)

Topic production code
Topic production codeTopic production code
Topic production code
 
How to scale your Test Automation
How to scale your Test AutomationHow to scale your Test Automation
How to scale your Test Automation
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
NYC MeetUp 10.9
NYC MeetUp 10.9NYC MeetUp 10.9
NYC MeetUp 10.9
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Scrum and-xp-from-the-trenches 06 testing
Scrum and-xp-from-the-trenches 06 testingScrum and-xp-from-the-trenches 06 testing
Scrum and-xp-from-the-trenches 06 testing
 
Automated testing vs manual testing
Automated testing vs manual testingAutomated testing vs manual testing
Automated testing vs manual testing
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 
Introduction to Unit Tests and TDD
Introduction to Unit Tests and TDDIntroduction to Unit Tests and TDD
Introduction to Unit Tests and TDD
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
QA and scrum
QA and scrumQA and scrum
QA and scrum
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 

Recently uploaded

Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 

Software Testing, Everyone's responsibility

  • 2. How can you know your code works? That’s easy. Test it. Test it again. Test it up. Test it down. Test it seven ways to Sunday. ~ Clean Coder Robert C. Martin (Uncle Bob)
  • 3. Isn’t Software Testing Expensive? • Long Regression Cycles • Time to write tests • Lack of feature development
  • 4. Cost Savings 1,000 hours of up-front implementation without TDD. TDD saved 623 man hours, or, for a team of 4, about a month of development. Here are the assumptions made: • Production bugs without TDD: 100 • Production bugs with TDD: 40 (60% fewer, middle ground between 40%— 80%) • Average time to fix bug at implementation (TDD) phase: 1 hour (this number is only used to derive the production bug fix cost) • Average time to fix a production bug: ~15 hours
  • 5. Testing Saves Money • Automate Regression • Write lots of smaller tests • Retire redundant tests • Less code rewrite because of bugs • Easier to refactor, grow code
  • 6. The Testing Ice Cream Cone • This is an Anti-pattern • Sometimes called Testing Cupcake.
  • 7. The Testing Pyramid • Write lots of fast tests, near 100% coverage • Push exception testing down the pyramid • Automate your happy path, full stack tests • Let QA specialists do what they do best (AdHoc, Exploratory, etc.)
  • 8. The Testing Pyramid • Technology Facing Tests == Developer Responsibility • Business Facing Tests == QA && Product Responsibility • Best, QA and Developers cross pair and write tests
  • 9. Unit tests are low-level, focusing on a small part of the software system. Unit tests are written by the programmers themselves using their regular tools - the only difference being the use of some sort of unit testing framework. Unit tests are expected to be significantly faster than other kinds of tests. https://martinfowler.com/bliki/UnitTest.html
  • 10. A component test is a test that limits the scope of the exercised software to a portion of the system under test. https://martinfowler.com/bliki/ComponentTest.html
  • 11. An integration test takes a small group of units, often two units, and tests their behavior as a whole, verifying that they coherently work together. https://testing.googleblog.com/2015/ 04/just-say-no-to-more-end-to-end- tests.html
  • 12.
  • 13. Contract/Consumer Tests Contracts should be about catching: • Bugs in the consumer • Misunderstanding from the consumer about end-points or payload • Breaking changes by the provider on end-points or payload https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html
  • 15. Automated UI Testing • Should cover sunny day scenarios • Testing through the UI is slow, increasing build times. • Most importantly such tests are very brittle.
  • 16. Test DrivenDevelopmentDesign 1. You are not allowed to write any production code until you first written a failing unit test. 2. You are not allowed to write more of a unit test than is sufficient to fail – and not compiling is failing. 3. You are not allowed to write more production code that is sufficient to pass the currently failing unit test.
  • 19. Testing Terminology - Doubles Test Double is the generic term for any kind of pretend object used in place of a real object for testing purposes.
  • 20. Testing Terminology - Doubles Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists.
  • 21. Testing Terminology - Doubles Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production.
  • 22. Testing Terminology - Doubles Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test.
  • 23. Testing Terminology - Doubles Mocks are objects pre- programmed with expectations which form a specification of the calls they are expected to receive.
  • 24. Testing Terminology - Doubles Spies are mock objects, as they record what is called. They allow for real methods to be called when they are not mocked.
  • 26. References and Links • https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks • https://martinfowler.com/articles/mocksArentStubs.html • https://www.amazon.com/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073 • https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html • https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html • https://watirmelon.blog/ • https://www.researchgate.net/publication/255965523_Integrating_Software_Assurance_into_the_Software _Development_Life_Cycle_SDLC • https://medium.com/javascript-scene/the-outrageous-cost-of-skipping-tdd-code-reviews-57887064c412 • https://www.thoughtworks.com/insights/blog/introducing-software-testing-cupcake-anti-pattern

Editor's Notes

  1. I'm going to talk about why developers should write tests. I want to cover some common myths about cost. I want to talk about the different kinds of developer written tests. I will cover some testing terminology AND. I want to talk about some of the mechanics of writing these tests.
  2. Writing tests is part of being a professional developer. This may sound controversial. http://www.ambysoft.com/surveys/tdd2008.html 2008 – 71% of Agile developers claim to practice TDD 2014 – 76% https://www.infoq.com/news/2016/07/developers-tdd-bdd-atdd 2016 – A little over 50% developers have adopted TDD/BDD practices You are not agile if you are not doing TDD, don’t fool yourself. Test first / test last
  3. https://medium.com/javascript-scene/the-outrageous-cost-of-skipping-tdd-code-reviews-57887064c412 initial project build-outs to take up to 30% longer with TDD
  4. TDD reduces production bug density 40% — 80%, (computer.org 03/2007) According to the IBM System Sciences Institute, fixing a production bug costs 100x more than fixing a bug at design time, and over 15x more than fixing a bug at implementation time. (https://www.researchgate.net/publication/255965523_Integrating_Software_Assurance_into_the_Software_Development_Life_Cycle_SDLC)
  5. Wouldn’t it be nice to have a near full regression on each code commit? Code as documentation. Developers document the code with tests. (Spock example) Writing tests while coding reduces bugs. This shifts re-writing to lack of or misunderstanding of requirements. Code refactoring is a huge cost. Having robust tests in place help ensure that refactors don’t break things. Helps define bounded context. Refactor to microservices.
  6. Writing tests usually spans 2-3 teams: Developers write unit, integration and component tests. Another team writes black box tests through the GUI. Manual testers have a set of scenarios that they execute manually. Generally, these teams work in isolation and do not collaborate much. Work happens sequentially, as opposed to in-sync. First developers write their code and corresponding tests, then manual testers run their tests, then GUI testers will write their tests. What does this scenario look like? A mini-waterfall.
  7. If QA knows and Trusts the tests that developers are writing, then why waste time re-testing This requires test reporting and metrics
  8. Unit tests are small Unit tests are FAST There should be a unit test for each conditional logic point You should also look to remove redundant unit tests
  9. Component tests exercise more than one thing. Can be used for testing how multiple methods interact Can be used to to test how different classes interact. Should NOT be used to test how separate systems interact
  10. Sounds similar to component tests My definition: testing separate parts of the system in isolation. API to Service to Database, and back Should not use common things like a shared database. Mocking or Stubbing still exists for external systems.
  11. Consumer Contact tests Becoming more important in Microservice environments
  12. Contract tests should not contain exhaustive exception testing. Push those down to the lower level tests It is the CONSUMER of the API that is responsible for doing contract tests
  13. Write tests to validate the UI Avoid record and run when ever possible
  14. Test recording software can be dangerous. Little changes require entire new tests to be made. Tools like cucumber and gherkin help UI code should be tested by the UI unit/component/integration test suite. Best, Devs and QA work to write these tests together so we can trust they are right and we don’t need to re-test
  15. This will drive you to write code that can easily be tested, hence the tests are driving your design.
  16. Spock example. This is a form of documentation
  17. Notice Assign, Act, Assert == Given, When, Then Junit & AssertJ
  18. https://martinfowler.com/articles/mocksArentStubs.html
  19. https://martinfowler.com/articles/mocksArentStubs.html A dummy may be a null, empty list, empty object.
  20. A good example of a fake is an in-memory database. Not suitable for production, but good for verification
  21. Stubs are more suitable when we care more about state verification than or outcome that code behavior, or whether something got called
  22. Mocks are said to either be restrictive or permissive restrictive FAIL when a non-programmed interaction takes place permissive will return a sane default if a non-programmed interaction takes place, often null
  23. Spies are useful when you want to stub or mock a method in the class that you are testing a different method in. Tax calculation, method to get tax rate by state
  24. There is a testing library or framework for almost any language. There is no excuse to not write tests.