SlideShare uma empresa Scribd logo
1 de 21
Fighting complexity
WITH UNIT TESTING AND CODE REVIEW
Agenda
1. Accidental complexity
2. Unit testing
3. Code Review
Typical effects
• Development productivity
• Maintenance costs
• Defect rate & severity
• Sanity
• Job security
Unit (classic)
Mock
Integration
Unit testing
Refactoring Spec
Continuous
Integration
Design QA
http://martinfowler.com/bliki/TestCoverage.html
Code review
- Before commit
- After commit
- Before merge
- After merge
Code review
- Code quality
- Completeness
- Test coverage
- (…)
- Simplicity
Beware of
• Unnecessary abstractions
• Excessive indirection layers
• Redundant technologies
• Premature optimization
Simplicity
So how do I start?
Well, 2 simple steps:
So how do I start?
Well, 2 simple steps:
- You stop not testing
- You stop not doing reviews
Ok, seriously
CODE REVIEW
* Sell the idea to the team
* Decide on standards
* Don’t spend much time on the tools!
* Hook code review to your development
process
UNIT TESTING
* Sell the idea to the team
* Look at examples, e.g open-source projects
* Add tests for a simple existing component(s)
* Be prepared for refactoring
* Hook JUnit to your build process & CI
* Add coverage validation to the code review
Thank you!
Questions? Comments?
http://junit.org/
https://code.google.com/p/mockito/
http://emma.sourceforge.net/
http://vimeo.com/10569751
Pavel_Grushetzky@epam.com
ORGCompetencyJava@epam.com

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

The complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David TzemachThe complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David Tzemach
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Embedded Testing 2015
Embedded Testing 2015Embedded Testing 2015
Embedded Testing 2015
 
«Гайд з попередження дефектів у продуктовій компанії» - Людмила Федчук
«Гайд з попередження дефектів у продуктовій компанії» - Людмила Федчук«Гайд з попередження дефектів у продуктовій компанії» - Людмила Федчук
«Гайд з попередження дефектів у продуктовій компанії» - Людмила Федчук
 
Continuous integration with Drone.IO
Continuous integration with Drone.IOContinuous integration with Drone.IO
Continuous integration with Drone.IO
 
Test automation in agile ecosystem
Test automation in agile ecosystemTest automation in agile ecosystem
Test automation in agile ecosystem
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Quality for developers
Quality for developersQuality for developers
Quality for developers
 
Testing JavaScript
Testing JavaScriptTesting JavaScript
Testing JavaScript
 
Testing as a Career
Testing as a CareerTesting as a Career
Testing as a Career
 
Software Testing, Everyone's responsibility
Software Testing, Everyone's responsibilitySoftware Testing, Everyone's responsibility
Software Testing, Everyone's responsibility
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
How google-tests-software
How google-tests-softwareHow google-tests-software
How google-tests-software
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
Service engineering
Service engineeringService engineering
Service engineering
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking Skeleton
 
testing
testingtesting
testing
 
Automated visual-regression-testing (1)
Automated visual-regression-testing (1)Automated visual-regression-testing (1)
Automated visual-regression-testing (1)
 
Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008
 

Destaque

Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design Matters
Mathias Verraes
 

Destaque (9)

Applying design thinking and complexity theory in agile organizations
Applying design thinking and complexity theory in agile organizations Applying design thinking and complexity theory in agile organizations
Applying design thinking and complexity theory in agile organizations
 
Lean Design Thinking Crash Course
Lean Design Thinking Crash CourseLean Design Thinking Crash Course
Lean Design Thinking Crash Course
 
Why Domain-Driven Design Matters
Why Domain-Driven Design MattersWhy Domain-Driven Design Matters
Why Domain-Driven Design Matters
 
Design Thinking and Agile Development in a Nutshell at Cebit 2014
Design Thinking and Agile Development in a Nutshell at Cebit 2014Design Thinking and Agile Development in a Nutshell at Cebit 2014
Design Thinking and Agile Development in a Nutshell at Cebit 2014
 
Design thinking and agile development
Design thinking and agile developmentDesign thinking and agile development
Design thinking and agile development
 
Complexity Theory Basic Concepts
Complexity Theory    Basic ConceptsComplexity Theory    Basic Concepts
Complexity Theory Basic Concepts
 
Architectural Professional Practice - Programming الممارسة المهنية المعمارية ...
Architectural Professional Practice - Programming الممارسة المهنية المعمارية ...Architectural Professional Practice - Programming الممارسة المهنية المعمارية ...
Architectural Professional Practice - Programming الممارسة المهنية المعمارية ...
 
The Zen of Scrum
The Zen of ScrumThe Zen of Scrum
The Zen of Scrum
 
Agile Software Development Overview
Agile Software Development OverviewAgile Software Development Overview
Agile Software Development Overview
 

Semelhante a Unit testing and code review

Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 
Innovation day 2013 2.5 joris vanderschrick (verhaert) - embedded system de...
Innovation day 2013   2.5 joris vanderschrick (verhaert) - embedded system de...Innovation day 2013   2.5 joris vanderschrick (verhaert) - embedded system de...
Innovation day 2013 2.5 joris vanderschrick (verhaert) - embedded system de...
Verhaert Masters in Innovation
 

Semelhante a Unit testing and code review (20)

TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality Loopback
 
Test planning and software's engineering
Test planning and software's engineeringTest planning and software's engineering
Test planning and software's engineering
 
Software coding & testing, software engineering
Software coding & testing, software engineeringSoftware coding & testing, software engineering
Software coding & testing, software engineering
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
Continuous Integration Practices
Continuous Integration Practices Continuous Integration Practices
Continuous Integration Practices
 
Continuous integration practices to improve the software quality
Continuous integration practices to improve the software qualityContinuous integration practices to improve the software quality
Continuous integration practices to improve the software quality
 
Practical Application of Agile Techniques in Developing Safety Related Systems
Practical Application of Agile Techniques in Developing Safety Related SystemsPractical Application of Agile Techniques in Developing Safety Related Systems
Practical Application of Agile Techniques in Developing Safety Related Systems
 
White box testing
White box testingWhite box testing
White box testing
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development & CI/CD
Test Driven Development & CI/CDTest Driven Development & CI/CD
Test Driven Development & CI/CD
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know
 
Innovation day 2013 2.5 joris vanderschrick (verhaert) - embedded system de...
Innovation day 2013   2.5 joris vanderschrick (verhaert) - embedded system de...Innovation day 2013   2.5 joris vanderschrick (verhaert) - embedded system de...
Innovation day 2013 2.5 joris vanderschrick (verhaert) - embedded system de...
 
The Test way
The Test wayThe Test way
The Test way
 
Practical unit testing in c & c++
Practical unit testing in c & c++Practical unit testing in c & c++
Practical unit testing in c & c++
 
Software Engineering : Process Models
Software Engineering : Process ModelsSoftware Engineering : Process Models
Software Engineering : Process Models
 
Tdd
TddTdd
Tdd
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Unit testing and code review