aspose file tools*
The moose likes Testing and the fly likes What is the purpose of unit testing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "What is the purpose of unit testing?" Watch "What is the purpose of unit testing?" New topic
Author

What is the purpose of unit testing?

Buddhika Mawella
Ranch Hand

Joined: Jan 06, 2011
Posts: 40

Hi,
I have seen many people are writing unit tests for their java programs. But what unit testing actually mean? What is the purpose of unit testing? What would be the result if we do not perform unit testing for our software?


BM
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1836
    
    7

I was goig to type up something, but the wikipedia entry on unit testing sums it up quite nicely. Also, you might want to have a look at the entry on test driven development.

The really, really short version is that unit tests are inteded to verify the correctness of individual units of a system. If you have a comprehensive test set you're essentially working with a safety net, because as soon as you make changes that break the contract guarded by a unit test, it will fail and you will know something's wrong right away.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the purpose of unit testing?