Difference between revisions of "Unit testing"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→See also) |
||
Line 19: | Line 19: | ||
== See also == | == See also == | ||
+ | * [[Acceptance testing]] | ||
+ | * [[Characterization test]] | ||
+ | * [[Component-based usability testing]] | ||
* [[Computer programming]] | * [[Computer programming]] | ||
+ | * [[Design predicates]] | ||
+ | * [[Design by contract]] | ||
+ | * [[Extreme programming]] | ||
+ | * [[Integration testing]] | ||
+ | * [[List of unit testing frameworks]] | ||
+ | * [[Regression testing]] | ||
+ | * [[Software archaeology]] | ||
* [[Software engineering]] | * [[Software engineering]] | ||
* [[Software testing]] | * [[Software testing]] | ||
* [[Source code]] | * [[Source code]] | ||
+ | * [[Test case]] | ||
+ | * [[Test-driven development]] | ||
+ | * [[xUnit]] – a family of unit testing frameworks | ||
== External links == | == External links == |
Revision as of 18:39, 9 May 2016
In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.
Description
Intuitively, one can view a unit as the smallest testable part of an application.
In procedural programming, a unit could be an entire module, but it is more commonly an individual function or procedure.
In object-oriented programming, a unit is often an entire interface, such as a class, but could be an individual method.
Unit tests are short code fragments created by programmers or occasionally by white box testers during the development process. It forms the basis for component testing.
Ideally, each test case is independent from the others.
Substitutes such as method stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in isolation.
Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended.
See also
- Acceptance testing
- Characterization test
- Component-based usability testing
- Computer programming
- Design predicates
- Design by contract
- Extreme programming
- Integration testing
- List of unit testing frameworks
- Regression testing
- Software archaeology
- Software engineering
- Software testing
- Source code
- Test case
- Test-driven development
- xUnit – a family of unit testing frameworks