SlideShare a Scribd company logo
REFACTORING AND
TESTING SOFTWARE
By: Stephen O’Dwyer
SUPPORTED LEGACY APPLICATION
 System is a main value driver
 Main system current state
 60+ REPORTED bugs
 70+ enhancements
 Managed by many teams and developers
 Refactoring and acceptance testing
 A way to advance the legacy system to a usable state
 Manageable for developers
LEGACY CODE
 Legacy code is
 Code we’ve gotten from someone else
 Slang for difficult to change code that developers don’t understand
 No acceptance, unit or integration test
BEHAVIOR OF SYSTEM
 Users depend on behavior
 Adding new features currently follows the edit and pray mentality
 Edit code base and pray it dose not have adverse side effects
 Users trust
 Trust is lost when changing functionality unintentionally and unknowingly
REFACTORING
 The act of improving design wile preserving existing functionality
 Time consuming in the beginning
 Use Industry refactoring techniques
 Sprout Method and class
 Reveal hidden dependency
 Identify Interception points
 Reduce constructor blob
REDUCE RISK OF REFACTORING
QUESTIONS
1. What changes do we have to make?
2. How will we know that we’ve done them correctly?
3. How will we know that we haven’t broken anything?
TESTING
 Regression
 Performed by QA team
 Unit test
 A piece of code that checks the correctness of production code
 Frameworks
 XUnit
 NUnit
QUALITY TEST
1. They run fast
2. They help us localize problems
CODE DEMO
CALL TO ACTION
 Write your first unit test
 Refactor a method
 Buy and read Working Effectively with Legacy code by Michael Feathers
REFERENCES
 Feathers, Michael - Working Effectively with Legacy Code
 Roy Osherove – The Art of Unit Testing

More Related Content

PPT
Testing introduction
PDF
Introduction to software testing
PPTX
Rest assured vodqa
PPTX
Testing & implementation system 1-wm
PPTX
Fundamentals of testing aldi
PPTX
Fundamentals of testing jef (1)
PPTX
Fundamentals of testing
PPTX
Fundamentals of testing
Testing introduction
Introduction to software testing
Rest assured vodqa
Testing & implementation system 1-wm
Fundamentals of testing aldi
Fundamentals of testing jef (1)
Fundamentals of testing
Fundamentals of testing

What's hot (19)

PPTX
Marjuni
PPTX
7 testing principles
PDF
Principles of software testing
PPTX
Seven testing principles
PPTX
Fundamentals of Testing
PPT
App Managing Test Environments From App Labs
PPTX
Agile, DevOps, & Hardware
PPTX
Fundamental of testing (what is testing)
PPTX
Fundamentals of testing
PPTX
Performance Testing – Look Before you Leap
PPTX
fundamentals of testing (Fundamental of testing what)
PPTX
Testing Principles
PPTX
Fundamentals of testing (what is testing necessary)
PPTX
Software testing principles
PPTX
FUNDAMENTALS OF TESTING (Fundamental of testing what)
PPTX
Fundamentals of testing 2
PDF
Best Practices for Selenium Test Automation
PPTX
fundamentals of testing (Fundamental of testing why)
PDF
How automation can help boost security
Marjuni
7 testing principles
Principles of software testing
Seven testing principles
Fundamentals of Testing
App Managing Test Environments From App Labs
Agile, DevOps, & Hardware
Fundamental of testing (what is testing)
Fundamentals of testing
Performance Testing – Look Before you Leap
fundamentals of testing (Fundamental of testing what)
Testing Principles
Fundamentals of testing (what is testing necessary)
Software testing principles
FUNDAMENTALS OF TESTING (Fundamental of testing what)
Fundamentals of testing 2
Best Practices for Selenium Test Automation
fundamentals of testing (Fundamental of testing why)
How automation can help boost security
Ad

Viewers also liked (6)

DOCX
Поздравление Ректора АРГУ 2016
PPTX
Herramientas de publicación
PDF
07 avgust
PPTX
Locked Freedom. Semis.
PDF
PDF
Поздравление Ректора АРГУ 2016
Herramientas de publicación
07 avgust
Locked Freedom. Semis.
Ad

Similar to Refactoring & Testing software. (20)

PPTX
Working Effectively with Legacy Code
PDF
Refactoring legacy code
PDF
Refactoring Legacy Code
PPTX
How I Learned to Stop Worrying and Love Legacy Code.....
PDF
Workshop fight legacy code write unit test
PDF
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
PPTX
Working effectively with legacy codes
PPT
Getting Unstuck: Working with Legacy Code and Data
PDF
Reengineering Legacy Software Chris Birchall
PPTX
Refactoring workshop
PPTX
Taming scary production code that nobody wants to touch
ODP
Dealing With Legacy: The Real-World Experience
PPTX
Presentation refactoring large legacy applications
PPTX
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
PPTX
Clean Code, Code Refactoring & TDD
PPTX
Escape the legacy code matrix - Vimercate
ODP
Legacycode01
PDF
Testing legacy code
PPTX
Testing in Legacy: From Rags to Riches
PPTX
Testing in Legacy: from Rags to Riches by Taras Slipets
Working Effectively with Legacy Code
Refactoring legacy code
Refactoring Legacy Code
How I Learned to Stop Worrying and Love Legacy Code.....
Workshop fight legacy code write unit test
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
Working effectively with legacy codes
Getting Unstuck: Working with Legacy Code and Data
Reengineering Legacy Software Chris Birchall
Refactoring workshop
Taming scary production code that nobody wants to touch
Dealing With Legacy: The Real-World Experience
Presentation refactoring large legacy applications
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
Clean Code, Code Refactoring & TDD
Escape the legacy code matrix - Vimercate
Legacycode01
Testing legacy code
Testing in Legacy: From Rags to Riches
Testing in Legacy: from Rags to Riches by Taras Slipets

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Understanding Forklifts - TECH EHS Solution
PDF
AI in Product Development-omnex systems
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Nekopoi APK 2025 free lastest update
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Essential Infomation Tech presentation.pptx
CHAPTER 2 - PM Management and IT Context
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Wondershare Filmora 15 Crack With Activation Key [2025
PTS Company Brochure 2025 (1).pdf.......
Understanding Forklifts - TECH EHS Solution
AI in Product Development-omnex systems
Adobe Illustrator 28.6 Crack My Vision of Vector Design
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms I-SECS-1021-03
Digital Strategies for Manufacturing Companies
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
VVF-Customer-Presentation2025-Ver1.9.pptx
How Creative Agencies Leverage Project Management Software.pdf
Reimagine Home Health with the Power of Agentic AI​
Nekopoi APK 2025 free lastest update
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Essential Infomation Tech presentation.pptx

Refactoring & Testing software.

  • 2. SUPPORTED LEGACY APPLICATION  System is a main value driver  Main system current state  60+ REPORTED bugs  70+ enhancements  Managed by many teams and developers  Refactoring and acceptance testing  A way to advance the legacy system to a usable state  Manageable for developers
  • 3. LEGACY CODE  Legacy code is  Code we’ve gotten from someone else  Slang for difficult to change code that developers don’t understand  No acceptance, unit or integration test
  • 4. BEHAVIOR OF SYSTEM  Users depend on behavior  Adding new features currently follows the edit and pray mentality  Edit code base and pray it dose not have adverse side effects  Users trust  Trust is lost when changing functionality unintentionally and unknowingly
  • 5. REFACTORING  The act of improving design wile preserving existing functionality  Time consuming in the beginning  Use Industry refactoring techniques  Sprout Method and class  Reveal hidden dependency  Identify Interception points  Reduce constructor blob
  • 6. REDUCE RISK OF REFACTORING QUESTIONS 1. What changes do we have to make? 2. How will we know that we’ve done them correctly? 3. How will we know that we haven’t broken anything?
  • 7. TESTING  Regression  Performed by QA team  Unit test  A piece of code that checks the correctness of production code  Frameworks  XUnit  NUnit
  • 8. QUALITY TEST 1. They run fast 2. They help us localize problems
  • 10. CALL TO ACTION  Write your first unit test  Refactor a method  Buy and read Working Effectively with Legacy code by Michael Feathers
  • 11. REFERENCES  Feathers, Michael - Working Effectively with Legacy Code  Roy Osherove – The Art of Unit Testing