Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Types of testing

 
Helana Neumann
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Christian,

What is unit testing, exactly, and how does it differ from other sorts of testing?

Thank you.

Best,
Helana Neumann
 
Christian Johansen
author
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helana,

A unit test is a small piece of code (function/method) that exercises some other code and verifies its expectations of its results. Unit tests typically test single behaviors of a system in isolation, and is aimed at catching method-level errors and providing a safety-net in which regressions can be caught. In TDD unit tests are also used to drive development and to guide the design of the code.

Unit testing is a developer activity, which sets it apart from how some large organizations do acceptance testing, as an example (i.e. organizations that have their own QA department/people).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic