SlideShare una empresa de 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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Destacado

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

Destacado (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
 

Similar 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
 

Similar 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

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
[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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Unit testing and code review