Your SlideShare is downloading. ×
0
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Tech talks #1- Unit testing and TDD

1,999

Published on

Presentation at FPT Aptech's TechTalks series

Presentation at FPT Aptech's TechTalks series

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

No Downloads
Views
Total Views
1,999
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
125
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • I don’t want to frustrate you by bunch of testing terms. Just focus on thinking, process and how-tos.
  • Global: 4.4 million cars recalled (http://wsws.org/articles/2010/feb2010/toyo-f12.shtml ) In the first quarter of 2009, the company posted a $7.7 billion loss. The estimated loss for Toyota in the current financial year, calculated before the expansion of the recall process in January, is $5.5 billion. http://parttimembadegree.com/business-school-cases/toyota-recalls-pr-management-crisis/ http://en.wikipedia.org/wiki/2009%E2%80%932011_Toyota_vehicle_recalls VN: “mua toy cho nó lành” – lost
  • For ROI optimization, see the analysis of Rex Black on Managing the Testing Process: Practical Tools and Techniques for Managing Hardware and Software Testing
  • In conclusion: Test a.s.a.p Testing is responsibilities of all including developers.
  • Introduced in XP
  • Design (simple) first => draft solution => Design criteria: testable
  • Refactor, clean code frequently
  • What is acceptance test? fist
  • Transcript

    • 1. TechTalks #1 Unit Testing and Test-Driven Development Duong Trong Tan [email_address] Hanoi, 9- 2011
    • 2. Objectives
      • Why testing?
      • Introduction to unit testing
      • Unit testing in Java with JUnit
      • What is Test-Driven Development?
      • How can TDD improve quality?
      • TDD practices and guidelines.
      Unit Testing and Test-Driven Development
    • 3. Unit Testing and Test-Driven Development CRISIS Numbers: 4.4 million cars recalled Billions of $ loss. Damage the brand
    • 4. Desire vs. Reality Unit Testing and Test-Driven Development gap Requirement Design Desired Implementation Reality testing
    • 5. Why testing?
      • Ensuring QUALITY
      • Managing RISKS
      • Optimizing Return-On-Investment (ROI)
      • Professionalism
      Unit Testing and Test-Driven Development
    • 6. Typical Production model Unit Testing and Test-Driven Development
    • 7. Bug cost Unit Testing and Test-Driven Development
    • 8. Balancing Unit Testing and Test-Driven Development GOOD FAST CHEAP
    • 9. Testing level
      • Unit testing
        • On individual unit of source code (function, class, etc.)
        • Smallest testable part
        • Developer testing
      • Integration testing
        • On groups of modules
      • System testing
        • On complete integrated system
      Unit Testing and Test-Driven Development
    • 10. JUnit
      • Unit testing automation framework for Java
      • Can do integration test
      • Integrated in IDEs (Eclipse, NetBeans, IntelliJ, etc.)
      • Must have tool for Java developers
      Unit Testing and Test-Driven Development http://www.junit.org/
    • 11. Test-Driven Development
      • You don’t start programming until you have designed your tests!
      • Strategy
        • Make it Fail
          • No code without a failing test
        • Make it Work
          • As simply as possible
        • Make it Better
          • Refactor(code, design, test, documentation)
        • Believe in testing
      Unit Testing and Test-Driven Development
    • 12. Suggested TDD Unit Testing and Test-Driven Development
    • 13. Thinking changed
      • Design or code must be TESTABLE
      • “ Error Message ” is a good news
      • Courage
      • Simple
      • Agile
      Unit Testing and Test-Driven Development
    • 14. How to do TDD
      • Design
        • Use [simple] design , figure out what to do
        • [Then .. create the skeleton first]
      • Test
        • Write test that reflect the design
        • All tests should FAIL
      • Implement
        • Write the code
      • Test
        • All tests should PASS
      Unit Testing and Test-Driven Development
    • 15. TDD live demo
      • Application: simplified Calculator
      • Language: Java
      • Tools used:
        • NetBeans 7
        • JUnit
        • Task board (Excel)
        • Whiteboard (for simple design)
      Unit Testing and Test-Driven Development
    • 16. Red-Green-Blue model Unit Testing and Test-Driven Development
    • 17. Refactor to Clean Code
      • Readable
      • Maintainable
      • Changeable
      Unit Testing and Test-Driven Development
    • 18. Acceptance Test-Driven Development Unit Testing and Test-Driven Development ATDD: team collaboration, a kind of cross-functionality Requirement Automated Acceptance Tests TDD Definition Of Done
    • 19. Acceptance TDD (ATDD)
      • 3D strategy
      • D iscuss in requirement workshop
        • To make tests library
      • D evelop in concurrence
        • To create more Passed features
      • D eliver for acceptance
        • To meet DONE definition, accepted by users
      Unit Testing and Test-Driven Development
    • 20. Supporting system: CI Unit Testing and Test-Driven Development
    • 21. Q&A Unit Testing and Test-Driven Development
    • 22. Further reading Unit Testing and Test-Driven Development
    • 23. Tools
      • JUnit : http://junit.org
      • FitNesse : http://fitnesse.org /
      • RoBotFramework: http ://code.google.com/p/robotframework /
      • Hudson CI : http://hudson-ci.org /
      • SVN : http://subversion.tigris.org /
      Unit Testing and Test-Driven Development
    • 24. Unit Testing and Test-Driven Development Thank you!
      • Meet Tấn DT:
      • TechTalks
      • HanoiScrum.net
      • Slideshare.net/duongtrongtan
      • Facebook: Duong Trong Tan
      • [email_address]

    ×