What does testing cost?
Testing is often more work than the actual application. Further, it often forces you to refactor your application to create testing hooks so that your testing harness can talk to your application. In my experience, adding testing hooks leads to better organized and more general code. Testing can take some work in the near term, but in the long run you are faster and get better, more maintainable code. What is a unit test versus a functional test? A unit test is usually a test on a method not on the overall functionality of a tool or application. For example, testing a method that returns large prime numbers is a unit test but testing the overall encryption algorithm that uses that method is a functional test. Ok, let’s dive into testing. These course notes describe how to begin building tests with jUnit, but does not go into great detail about the class hierarchy etc… (Learning how to test software is an art all by itself). You may find the FAQ and the jUnit Home Page useful for lear