• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Scope of JUnit

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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... ;-)
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic