Name
DEV-06: Set up and use formal unit testing procedures.
Synopsis
A unit test is a test a developer creates to ensure that his or her “unit,” usually a single program, works properly. A unit test is very different from a system or functional test; these latter types of tests are oriented to application features or overall testing of the system. You can’t properly or effectively perform a system test until you know that the individual programs behave as expected.
So, of course, you would therefore expect that programmers do lots of unit testing and have a correspondingly high level of confidence in their programs. Ah, if only that were the case! The reality is that programmers generally perform an inadequate number of inadequate tests and figure that if the users don’t find a bug, there is no bug. Why does this happen? Let me count the ways:
- The psychology of success and failure
We are so focused on getting our code to work correctly that we generally shy away from bad news, from even wanting to take the chance of getting bad news. Better to do some cursory testing, confirm that it seems to be working OK, and then wait for others to find bugs, if there are any (as if there were any doubt).
- Deadline pressures
Hey, it’s Internet time! Time to market determines all. We need everything yesterday, so let’s be just like Microsoft and Netscape: release pre-beta software as production and let our users test/suffer through our applications.
- Management’s lack of understanding
IT management is ...
Get Oracle PL/SQL Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.