SlideShare a Scribd company logo
xUnit Test Patterns
Test organization; Smells;
● Definitions
● Test phases
● Test organization
● Smells’ types
Agenda
SUT = Subject Under Test
● Unit testing
○ Procedural programming - procedure
○ Functional programming - function
○ OOP - object
● Non-unit testing - REST service, UI app, cli app, DB, etc.
● Examples
○ Unit testing
○ Non-unit testing
CI = Continuous Integration
● “is the practice of automating the integration of code changes from multiple
contributors into a single software project”
● “CI process is comprised of automatic tools that assert the new code’s
correctness before integration.”
● Tools - version control system, automated code quality tests, syntax style
review tools, and more.
Atlassian: What is CI
Test Phases
source
Test Phases
4 phase test at xunitpatterns.com
Test Phases explained
source
Test Suite
● Contains test cases
● Contains test suites
(composite)
● Demo
Test Suite - test case organization
● Per feature - user login
● Per fixture - test cases need a shopping basket with 2
items inside.
Smells
Smells
● Definition
● What can you do ?
5 Whys
● Code smells
● Behavior smells
● Project smells
Types of Smells
Project Smells
Behavior Smells
● API/UI sensitivity
● Context/Data sensitivity - Fixture’s modified.
● Behavior sensitivity - SUT’s modified.
Code Smells
● Obscure tests
● Conditional test logic
● Hard-coded test data literals
● Hard-to-test code
● Code duplication
● Test logic in production
● 4 test phases
● Tests’ organization
● Smells
Wrap-up
Review
Questions?
Answers.

More Related Content

What's hot

What's hot (18)

ITFT--Software testing
ITFT--Software testingITFT--Software testing
ITFT--Software testing
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Continuous delivery and the challenges for the test automation
Continuous delivery and the challenges for the test automationContinuous delivery and the challenges for the test automation
Continuous delivery and the challenges for the test automation
 
DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014
 
software testing
software testing software testing
software testing
 
Vlsi
VlsiVlsi
Vlsi
 
Unit testing
Unit testing Unit testing
Unit testing
 
User story workflow (eng)
User story workflow (eng)User story workflow (eng)
User story workflow (eng)
 
Quality for developers
Quality for developersQuality for developers
Quality for developers
 
MythBusters: Functional Testing Edition
MythBusters: Functional Testing EditionMythBusters: Functional Testing Edition
MythBusters: Functional Testing Edition
 
Testing
TestingTesting
Testing
 
What Is Software Testing Life Cycle Process
What Is Software Testing Life Cycle ProcessWhat Is Software Testing Life Cycle Process
What Is Software Testing Life Cycle Process
 
Specifics of static analyzer development and testing
Specifics of static analyzer development and testingSpecifics of static analyzer development and testing
Specifics of static analyzer development and testing
 
Unit testing
Unit testingUnit testing
Unit testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Testing JavaScript
Testing JavaScriptTesting JavaScript
Testing JavaScript
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software testing tools
Software testing toolsSoftware testing tools
Software testing tools
 

Similar to xUnit test patterns 1

Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Andrey Oleynik
 
manualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfmanualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfperamdevi06
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitweili_at_slideshare
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
software testing
 software testing software testing
software testingSara shall
 
Manual Testing software testing all slide
Manual Testing software testing all slideManual Testing software testing all slide
Manual Testing software testing all slideSmileySmiley39
 
Software Testing Foundations Part 2 - Testing in Software Lifecycle
Software Testing Foundations Part 2 - Testing in Software LifecycleSoftware Testing Foundations Part 2 - Testing in Software Lifecycle
Software Testing Foundations Part 2 - Testing in Software LifecycleNikita Knysh
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSaqib Raza
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testingHaris Jamil
 
Objectorientedtesting 160320132146
Objectorientedtesting 160320132146Objectorientedtesting 160320132146
Objectorientedtesting 160320132146vidhyyav
 
Fundamentals of software testing
Fundamentals of software testingFundamentals of software testing
Fundamentals of software testingNoha Gamal
 
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbsModule 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbsShivang100
 
Validation & verification software engineering
Validation & verification software engineeringValidation & verification software engineering
Validation & verification software engineeringSweta Kumari Barnwal
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?QA InfoTech
 
Gabriel carabat a healthy approach for test automation
Gabriel carabat   a healthy approach for test automationGabriel carabat   a healthy approach for test automation
Gabriel carabat a healthy approach for test automationRomania Testing
 
Software testing
Software testingSoftware testing
Software testingmkn3009
 

Similar to xUnit test patterns 1 (20)

Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)
 
manualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfmanualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdf
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
software testing
 software testing software testing
software testing
 
Manual Testing software testing all slide
Manual Testing software testing all slideManual Testing software testing all slide
Manual Testing software testing all slide
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Software quality-libreplan
Software quality-libreplanSoftware quality-libreplan
Software quality-libreplan
 
Software Testing Foundations Part 2 - Testing in Software Lifecycle
Software Testing Foundations Part 2 - Testing in Software LifecycleSoftware Testing Foundations Part 2 - Testing in Software Lifecycle
Software Testing Foundations Part 2 - Testing in Software Lifecycle
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Objectorientedtesting 160320132146
Objectorientedtesting 160320132146Objectorientedtesting 160320132146
Objectorientedtesting 160320132146
 
Fundamentals of software testing
Fundamentals of software testingFundamentals of software testing
Fundamentals of software testing
 
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbsModule 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
 
Validation & verification software engineering
Validation & verification software engineeringValidation & verification software engineering
Validation & verification software engineering
 
Python in Test automation
Python in Test automationPython in Test automation
Python in Test automation
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?
 
Gabriel carabat a healthy approach for test automation
Gabriel carabat   a healthy approach for test automationGabriel carabat   a healthy approach for test automation
Gabriel carabat a healthy approach for test automation
 
Software testing
Software testingSoftware testing
Software testing
 

Recently uploaded

TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessWSO2
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsGlobus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptxGeorgi Kodinov
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfMayankTawar1
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 

xUnit test patterns 1

Editor's Notes

  1. (AAA)
  2. Project smells - production bugs, failed daily builds, buggy tests
  3. bugs found - buggy code, buggy tests build failure's rate developers are not writing tests
  4. Fragile tests - interface, behavior, context, data sensitivities; fragile fixture; Erratic tests - interacting tests, test run wars, unrepeatable tests Frequent debugging Manual intervention Slow tests
  5. Project smells - production bugs, failed daily builds, buggy tests