Unit testing and code review

331
-1

Published on

Backing slides for my internal introductory webinar, "fighting complexity with unit testing and code review". Public version is slightly modified.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
331
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Unit testing and code review

  1. 1. Fighting complexity WITH UNIT TESTING AND CODE REVIEW
  2. 2. Agenda 1. Accidental complexity 2. Unit testing 3. Code Review
  3. 3. Typical effects • Development productivity • Maintenance costs • Defect rate & severity • Sanity • Job security
  4. 4. Unit (classic) Mock Integration
  5. 5. Unit testing Refactoring Spec Continuous Integration Design QA
  6. 6. http://martinfowler.com/bliki/TestCoverage.html
  7. 7. Code review - Before commit - After commit - Before merge - After merge
  8. 8. Code review - Code quality - Completeness - Test coverage - (…) - Simplicity
  9. 9. Beware of • Unnecessary abstractions • Excessive indirection layers • Redundant technologies • Premature optimization Simplicity
  10. 10. So how do I start? Well, 2 simple steps:
  11. 11. So how do I start? Well, 2 simple steps: - You stop not testing - You stop not doing reviews
  12. 12. 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
  13. 13. 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

×