Papers/Unit Testing

Why Bother to Unit Test? Executive Summary

tomato13 2007. 6. 16. 16:12

필요한 부분만을 읽어보고 일부 인용하였다.

 

http://www.ipl.com/pdf/p0828.pdf

 

3.1. It consumes too much time
In practice, properly planned unit tests consume approximately as much effort as writing the actual code. once completed, many bugs will have been corrected and developers can proceed to a much more efficient integration, knowing that they have reliable components to begin with. Real progress has been made, so properly planned unit testing is a much more efficient use of time. Uncontrolled rambling with a debugger consumes a lot more time for less benefit.

 

3.2 It only proves that the code does what the code does
They will catch the (hopefully) rare compiler bug; but they could be achieving so much more. If they had first written a specification, then tests could be based upon the specification. The code could then be tested against its specification, not against itself. Such a test will continue to catch compiler bugs. It will also find a lot more coding errors and even some errors in the specification. Better specifications enable better testing, and the corollary is that better testing requires better specifications.

 

5. Conclusion

Given units which have been tested, the integration process is greatly simplified. Developers will be able to concentrate upon the interactions between units and the overall functionality without being swamped by lots of little bugs within the units.

'Papers > Unit Testing' 카테고리의 다른 글

What is a fixture?  (0) 2008.08.02
Automated Unit Testing of Embedded ARM Applications  (0) 2008.02.09
The reasons why testing by developers is very important  (0) 2007.12.07
How Unit Tests Help Developers  (0) 2007.06.16
Advanced Unit Testing  (0) 2007.04.19