Unit testing frameworks, which help simplify the process of unit testing, have been developed for a wide variety of languages. It is generally possible to perform unit testing without the support of specific framework by writing client code that exercises the units under test and uses assertions, exception handling or other control flow mechanisms to signal failure.
This approach is valuable in that there is a barrier to entry for the adoption of unit testing; having scant unit tests is hardly better than having none at all, whereas once a framework is in place, adding unit tests becomes relatively easy.
But in some frameworks many advanced unit test features are missing or must be hand-coded.As a consequence, unit testing is traditionally a motivator for programmers to create decoupled and cohesive code bodies. This practice promotes healthy habits in software development.
Design patterns, unit testing, and refactoring often work together so that the most ideal solution may emerge.
Sunday, June 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment