Friday, May 31, 2013

Episode 25: Unit Testing


Download

News
Tool of the Show
Book of the Show


Unit Testing

History
  • 1956 “The Debugging Period”
    • Testing associated with debugging
  • 1957 - 1978 “Demonstration Period”
    • Show software satisfies requirements
  • 1979 - 1982 “Destruction Oriented Period”
    • Testing should find errors
  • 1983 - 1987 “Evaluation Oriented Period”
    • Testing to measure quality
  • 1988+ “Prevention-Oriented”
    • Detect and prevent faults
Features
  • Prove correctness
  • Mocking
  • Code Coverage (Statement  and branch)
Strengths
  • Establish a contract for the code
  • Make sure there is no unreachable code
  • Force writing testable code
  • Can serve as programmatic documentation
Weaknesses
  • Time consuming
  • Establish constraints that may not be valid
  • False sense of security
Tools
  • Java
    • JUnit
    • EasyMock, Mockito
  • C++
    • cpptest
    • gmock