Game Development Reference
In-Depth Information
chapter 10
Unit Testing
with NUnit
Testing by itself does not improve software quality. Test results are an indi-
cator of quality, but in and of themselves, they don't improve it. Trying to
improve software quality by increasing the amount of testing is like trying
to lose weight by weighing yourself more often. What you eat before you
step onto the scale determines how much you will weigh, and the software
development techniques you use determine how many errors testing will
find. If you want to lose weight, don't buy a new scale; change your diet. If
you want to improve your software, don't test more; develop better.
Steve C. McConnell, “Code Complete”
Testing is an important aspect of any software project, and there are many differ-
ent kinds of tests that can be performed. An important, yet often misunderstood
or ignored method of testing is the unit test. Unit testing is an inexpensive way that
developers can write better code—faster. Large companies tend to spend a lot of
time and resources on testing, yet usually do so near the end of a project, often
meaning the testing is minimized or reduced because of budget and schedule con-
straints. In actuality, testing should be done extremely early in development, as
well as continuously thereafter.
Programmers generally think of testing as a nuisance, because they would rather
be writing code. Unit testing is not a grand quality initiative for large companies;
unit testing is done by programmers for programmers. Many developers write
throwaway code to test functionality, but doing so can introduce some problems
and decrease the credibility of the test cases.
Search Nedrilad ::

Custom Search