Definition: By knowing the inner logic the program the
test what you conduct is Unit Testing. or Testing the piece/unit of a program
Unit testing
is a procedure used to validate that a particular
http://en.wikipedia.org/wiki/Module_%28programming%29 -
- source code is
working properly. The procedure is to write test cases for all
http://en.wikipedia.org/wiki/Subroutine -
- methods so
that whenever a change causes a
http://en.wikipedia.org/wiki/Regression_testing -
Benefits:
The goal of unit testing
is to isolate each part of the program and show that the individual parts are
correct. Unit testing provides a strict, written contract that the piece of code
must satisfy. As a result, it affords several benefits.
1) Facilitates Change
2) Simplifies Integration
3) Documentation
4) Separation of Interface from Implementation
Limitations of Unit Testing:
Unit-testing
will not catch every error in the program. By definition, it only tests the
functionality of the units themselves. Therefore, it will not catch integration
errors,
http://en.wikipedia.org/wiki/Performance_testing -
- software testing
activities .
It is unrealistic to test all possible input combinations for any non-trivial
piece of software. A unit test can only show the presence of errors; it cannot
show the absence of errors. Though these two limitations apply to any form of
software test.
|