SlideShare a Scribd company logo
1 of 24
Download to read offline
Unit Testing
Diego Pacheco
Too busy to improve our tests...
The culture we need...
❏ Tests allow SAFE Refactoring
❏ Tests are a SAFETY REQUIREMENT
❏ We should NEVER skip them
❏ We need to TRUST our tests, FLAKY tests are
worse than NO TEST.
❏ We need stop the EXCUSES.
❏ Just do it.
Dimensional quality == Dimensional Tests
Testing == Economics
V MODEL
Testing is for everybody!
Discovery, MVP, Lean Startup, UX are about testing...
Testing Pyramid
Reality...
Level of testing...
Mock Contract
Stress Testing
Chaos Testing
Developer
Testing
Developer Tests:: It's all about SPEED
❏ Faster discovery
❏ Faster validation
❏ Faster Debugging
❏ Faster Layouting
❏ It's a MUST !!!!
❏ Simplified “Service”
❏ Simple Main Class
❏ Debug tricks.
Mocked Contract
❏ How do we know we don't break the CONSUMERS?
❏ Frontend
❏ Mobile
❏ BFFs
❏ We should:
❏ Version
❏ Gast Regression props
❏ Know before the CONSUMERS any breaking
change.
Stress Tests
❏ Stress | Load Testing
❏ How I know my bottlenecks?
❏ When the system breaks? Why it breaks?
❏ We need to play with:
❏ Sensitive Operations
❏ Number of concurrent users
❏ Load Patterns
❏ Best done via Gatling (https://gatling.io/)
Chaos Testing
❏ Software fails all the time.
❏ Hope is not a strategy
❏ Types of failure:
❏ Datacenter is down.
❏ AZ is down.
❏ Service is down
❏ Latency
❏ Burn: CPU, network, Disk.
❏ Bombos: Strings, JVM, volume...
❏ Best done via Netflix tools, linux and creativity
Testing beyond the happy path....
❏ Null
❏ Invalid dates
❏ Special chars in Strings
❏ List corner cases
❏ Negative numbers
❏ Long ranges
❏ Wrong objects
❏ Think in scenarios before CODE.
Testing beyond the happy path....
❏ Invalid Order
❏ Did you try exploratory ramon crazy tests?
❏ What if the dependencies are not there?
❏ How possible exceptions we might have?
❏ What if we it “works”...
Why is important to have COVERAGE GOALS
❏ Most Engineers don't lear TESTS on university
❏ Some companies still have QAs
❏ Developer need to understand that is his responsibility to
ship STABLE CODE.
❏ CODE Revier Kanban queue policies +10 per class.
❏ XP BIG Visible charts on the WALL
❏ Feel the same of the lack of tests.
We will implement some Features for a BANK
customer and we will create tons of TESTs and
we will refactor the code.
https://github.com/diegopacheco/unit-testing-training
Unit Testing
Diego Pacheco

More Related Content

Similar to Unit testing traning

Amazon builder Library notes
Amazon builder Library notesAmazon builder Library notes
Amazon builder Library notesDiego Pacheco
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)Rodrigo Lopes
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practicesBill Buchan
 
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasTalking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasRachel M. Carmena
 
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...Steve Lange
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With PytestEddy Reyes
 
Experiences building a multi region cassandra operations orchestrator on aws
Experiences building a multi region cassandra operations orchestrator on awsExperiences building a multi region cassandra operations orchestrator on aws
Experiences building a multi region cassandra operations orchestrator on awsDiego Pacheco
 
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...Steve Lange
 
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...Juraj Martinka
 
Cloud-Native DevOps Engineering
Cloud-Native DevOps EngineeringCloud-Native DevOps Engineering
Cloud-Native DevOps EngineeringDiego Pacheco
 
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Rachel M. Carmena
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with LaravelTyler Johnston
 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Stealmozilla.presentations
 
OSDC 2014: Fernando Hönig - New Data Center Service Model: Cloud + DevOps
OSDC 2014:  Fernando Hönig - New Data Center Service Model: Cloud + DevOpsOSDC 2014:  Fernando Hönig - New Data Center Service Model: Cloud + DevOps
OSDC 2014: Fernando Hönig - New Data Center Service Model: Cloud + DevOpsNETWAYS
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential SkillsJohn Choi
 
From Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge GroupFrom Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge GroupDouglas Adams
 
Andrea Di Persio
Andrea Di PersioAndrea Di Persio
Andrea Di PersioCodeFest
 
Winning strategies in Test Automation
Winning strategies in Test AutomationWinning strategies in Test Automation
Winning strategies in Test AutomationXBOSoft
 

Similar to Unit testing traning (20)

Amazon builder Library notes
Amazon builder Library notesAmazon builder Library notes
Amazon builder Library notes
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)
 
Agile Experiences
Agile ExperiencesAgile Experiences
Agile Experiences
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practices
 
Hardening
HardeningHardening
Hardening
 
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasTalking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katas
 
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
Session #3: "It Works on My Machine!" Closing the Loop Between Development & ...
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With Pytest
 
Experiences building a multi region cassandra operations orchestrator on aws
Experiences building a multi region cassandra operations orchestrator on awsExperiences building a multi region cassandra operations orchestrator on aws
Experiences building a multi region cassandra operations orchestrator on aws
 
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
 
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
 
Cloud-Native DevOps Engineering
Cloud-Native DevOps EngineeringCloud-Native DevOps Engineering
Cloud-Native DevOps Engineering
 
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Steal
 
OSDC 2014: Fernando Hönig - New Data Center Service Model: Cloud + DevOps
OSDC 2014:  Fernando Hönig - New Data Center Service Model: Cloud + DevOpsOSDC 2014:  Fernando Hönig - New Data Center Service Model: Cloud + DevOps
OSDC 2014: Fernando Hönig - New Data Center Service Model: Cloud + DevOps
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
 
From Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge GroupFrom Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge Group
 
Andrea Di Persio
Andrea Di PersioAndrea Di Persio
Andrea Di Persio
 
Winning strategies in Test Automation
Winning strategies in Test AutomationWinning strategies in Test Automation
Winning strategies in Test Automation
 

More from Diego Pacheco

Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Diego Pacheco
 
Continuous Discovery Habits Book Review.pdf
Continuous Discovery Habits  Book Review.pdfContinuous Discovery Habits  Book Review.pdf
Continuous Discovery Habits Book Review.pdfDiego Pacheco
 
Thoughts about Shape Up
Thoughts about Shape UpThoughts about Shape Up
Thoughts about Shape UpDiego Pacheco
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep DiveDiego Pacheco
 
Management: Doing the non-obvious! III
Management: Doing the non-obvious! IIIManagement: Doing the non-obvious! III
Management: Doing the non-obvious! IIIDiego Pacheco
 
Design is not Subjective
Design is not SubjectiveDesign is not Subjective
Design is not SubjectiveDiego Pacheco
 
Architecture & Engineering : Doing the non-obvious!
Architecture & Engineering :  Doing the non-obvious!Architecture & Engineering :  Doing the non-obvious!
Architecture & Engineering : Doing the non-obvious!Diego Pacheco
 
Management doing the non-obvious II
Management doing the non-obvious II Management doing the non-obvious II
Management doing the non-obvious II Diego Pacheco
 
Testing in production
Testing in productionTesting in production
Testing in productionDiego Pacheco
 
Nine lies about work
Nine lies about workNine lies about work
Nine lies about workDiego Pacheco
 
Management: doing the nonobvious!
Management: doing the nonobvious!Management: doing the nonobvious!
Management: doing the nonobvious!Diego Pacheco
 
Dealing with dependencies
Dealing  with dependenciesDealing  with dependencies
Dealing with dependenciesDiego Pacheco
 
Dealing with dependencies in tests
Dealing  with dependencies in testsDealing  with dependencies in tests
Dealing with dependencies in testsDiego Pacheco
 

More from Diego Pacheco (20)

Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!
 
Continuous Discovery Habits Book Review.pdf
Continuous Discovery Habits  Book Review.pdfContinuous Discovery Habits  Book Review.pdf
Continuous Discovery Habits Book Review.pdf
 
Thoughts about Shape Up
Thoughts about Shape UpThoughts about Shape Up
Thoughts about Shape Up
 
Holacracy
HolacracyHolacracy
Holacracy
 
AWS IAM
AWS IAMAWS IAM
AWS IAM
 
CDKs
CDKsCDKs
CDKs
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep Dive
 
Sec 101
Sec 101Sec 101
Sec 101
 
Reflections on SCM
Reflections on SCMReflections on SCM
Reflections on SCM
 
Management: Doing the non-obvious! III
Management: Doing the non-obvious! IIIManagement: Doing the non-obvious! III
Management: Doing the non-obvious! III
 
Design is not Subjective
Design is not SubjectiveDesign is not Subjective
Design is not Subjective
 
Architecture & Engineering : Doing the non-obvious!
Architecture & Engineering :  Doing the non-obvious!Architecture & Engineering :  Doing the non-obvious!
Architecture & Engineering : Doing the non-obvious!
 
Management doing the non-obvious II
Management doing the non-obvious II Management doing the non-obvious II
Management doing the non-obvious II
 
Testing in production
Testing in productionTesting in production
Testing in production
 
Nine lies about work
Nine lies about workNine lies about work
Nine lies about work
 
Management: doing the nonobvious!
Management: doing the nonobvious!Management: doing the nonobvious!
Management: doing the nonobvious!
 
AI and the Future
AI and the FutureAI and the Future
AI and the Future
 
Dealing with dependencies
Dealing  with dependenciesDealing  with dependencies
Dealing with dependencies
 
Dealing with dependencies in tests
Dealing  with dependencies in testsDealing  with dependencies in tests
Dealing with dependencies in tests
 
Kanban 2020
Kanban 2020Kanban 2020
Kanban 2020
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Unit testing traning

  • 2.
  • 3.
  • 4. Too busy to improve our tests...
  • 5. The culture we need... ❏ Tests allow SAFE Refactoring ❏ Tests are a SAFETY REQUIREMENT ❏ We should NEVER skip them ❏ We need to TRUST our tests, FLAKY tests are worse than NO TEST. ❏ We need stop the EXCUSES. ❏ Just do it.
  • 6. Dimensional quality == Dimensional Tests
  • 7.
  • 10. Testing is for everybody!
  • 11. Discovery, MVP, Lean Startup, UX are about testing...
  • 14. Level of testing... Mock Contract Stress Testing Chaos Testing Developer Testing
  • 15. Developer Tests:: It's all about SPEED ❏ Faster discovery ❏ Faster validation ❏ Faster Debugging ❏ Faster Layouting ❏ It's a MUST !!!! ❏ Simplified “Service” ❏ Simple Main Class ❏ Debug tricks.
  • 16. Mocked Contract ❏ How do we know we don't break the CONSUMERS? ❏ Frontend ❏ Mobile ❏ BFFs ❏ We should: ❏ Version ❏ Gast Regression props ❏ Know before the CONSUMERS any breaking change.
  • 17. Stress Tests ❏ Stress | Load Testing ❏ How I know my bottlenecks? ❏ When the system breaks? Why it breaks? ❏ We need to play with: ❏ Sensitive Operations ❏ Number of concurrent users ❏ Load Patterns ❏ Best done via Gatling (https://gatling.io/)
  • 18. Chaos Testing ❏ Software fails all the time. ❏ Hope is not a strategy ❏ Types of failure: ❏ Datacenter is down. ❏ AZ is down. ❏ Service is down ❏ Latency ❏ Burn: CPU, network, Disk. ❏ Bombos: Strings, JVM, volume... ❏ Best done via Netflix tools, linux and creativity
  • 19. Testing beyond the happy path.... ❏ Null ❏ Invalid dates ❏ Special chars in Strings ❏ List corner cases ❏ Negative numbers ❏ Long ranges ❏ Wrong objects ❏ Think in scenarios before CODE.
  • 20. Testing beyond the happy path.... ❏ Invalid Order ❏ Did you try exploratory ramon crazy tests? ❏ What if the dependencies are not there? ❏ How possible exceptions we might have? ❏ What if we it “works”...
  • 21. Why is important to have COVERAGE GOALS ❏ Most Engineers don't lear TESTS on university ❏ Some companies still have QAs ❏ Developer need to understand that is his responsibility to ship STABLE CODE. ❏ CODE Revier Kanban queue policies +10 per class. ❏ XP BIG Visible charts on the WALL ❏ Feel the same of the lack of tests.
  • 22.
  • 23. We will implement some Features for a BANK customer and we will create tons of TESTs and we will refactor the code. https://github.com/diegopacheco/unit-testing-training