Why use junit ? I can write my own class which return me back the results of a comparison ?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Archna_Gupta
Posted On:   Friday, August 15, 2003 09:58 AM


I have a test case which return true if value A equals value B ? I can write my own comparison method for this . Similarly for any other condition. Whats the use of junit then (if I am not using its graphical interface) ?

Re: Why use junit ? I can write my own class which return me back the results of a comparison ?

Posted By:   prashant_jani  
Posted On:   Thursday, September 4, 2003 11:48 PM


Hi,

I guess there are better things to do other then re-working.
say u can extned the junit api .. now dont ask why ?

Re: Why use junit ? I can write my own class which return me back the results of a comparison ?

Posted By:   Benoit_Quintin  
Posted On:   Friday, August 15, 2003 10:36 AM

Well, first of all, your tests will be somewhat standardized, therefore any programmer who reads your code can read the tests more easily.

Also, with JUnit you can create test fixtures and test suites, which can help you automate tests and make sure every change is ok.(if you don't know what a suite or a fixture is, read it up on JUnit's site.

And, last but not least, these classes are already debugged, work well and has a published, documented and reusable API.

I think the question you should be asking is "Why would I like to reproduceJUnit's API (and debug, test, fix) when it's already there and used by thousands?"

About | Sitemap | Contact