One of the interest of JUnit is to provide a framework for unitary testing. I have recently experienced unit testing with and without the JUnit framework. Of course, the tests had been coded by several developers, who all had their own habits (even if a procedure exists ). While upgrading, we had to know if the tests were ok. Running and Checking the 'noJunit' tests results was painful. I had to find out where the test classes were, find all of them, run the test classes individually, read the result of each individual before concluding the tests were ok. In the second case, with the "Junit" test results I only needed to run a class named 'RootSuite' and read the results as "123 tests runned. Ok" [ March 12, 2002: Message edited by: Wilfried LAURENT ]
Originally posted by Varun Narula: Most java programmers test a condition/parameter by sending the output to the system. If the outputs ok, the thing works.
Does it still work in two minutes? Half an hour? Tomorrow? Next week? In six Months? With a JUnit-Testsuite you can run hundreds of tests in a matter of seconds to minutes with one mouse click. You can do this every time you need confidence in your code - even when you need it most: when you get short of time and manual testing will get omitted. Developers indulged in test-first-development will in fact run the testsuite every couple of minutes. This form of feedback can be addictive... ;-)
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus