Forums Register Login

Scope of JUnit

+Pie Number of slices to send: Send
Most java programmers test a condition/parameter by sending the output to the system. If the outputs ok, the thing works.
Would JUnit serve any purpose for the most trivial of tests ?
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
 

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... ;-)
No, tomorrow we rule the world! With this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 941 times.
Similar Threads
Testing tools
struts test case problem
how to run a normal java program without main method
Tools for testing static methods
Tools for testing static methods
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:17:10.