Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the purpose of unit testing?

 
Buddhika Mawella
Ranch Hand
Posts: 40
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic