week 14 slides
week 14 slides
Why testing?
• Improve software design
• Make software easier to understand
• Reduce debugging time
• Catch integration errors
In short, to Produce Better Code
Preconditions
• Working code
• Good set of unit tests
Etc..
Input Output
Input Output
Unit
• Individual classes or
types
Component
• Group of related classes
or types
Integration
• Interaction between
classes
does nothing
If a test fails, it throws an
AssertionFailedError
The JUnit framework catches the error