Unit testing
Unit testing,
also known as component testing, refers to tests that verify the functionality
of a specific section of code, usually at the function level. In an
object-oriented environment, this is usually at the class level, and the
minimal unit tests include the constructors and destructors.
These types of
tests are usually written by developers as they work on code (white-box style),
to ensure that the specific function is working as expected. One function might
have multiple tests, to catch corner cases or other branches in the code. Unit
testing alone cannot verify the functionality of a piece of software, but
rather is used to ensure that the building blocks of the software work
independently from each other.
Unit testing is
a software development process that involves synchronized application of a
broad spectrum of defect prevention and detection strategies in order to reduce
software development risks, time, and costs. It is performed by the software
developer or engineer during the construction phase of the software development
lifecycle. Rather than replace traditional QA focuses, it augments it. Unit
testing aims to eliminate construction errors before code is promoted to QA;
this strategy is intended to increase the quality of the resulting software as
well as the efficiency of the overall development and QA process.
Depending on
the organization's expectations for software development, unit testing might
include static code analysis,
data flow analysis, metrics analysis, peer code reviews, code coverage analysis
and other software verification practices.
No comments:
Post a Comment