8.2. Extreme Testing: The Concepts
To meet the pace and philosophy of XP, developers use extreme testing, which focuses on constant testing. As mentioned earlier in the chapter, two forms of testing make up the bulk of XT: unit testing and acceptance testing. The theory used when writing the tests does not vary significantly from the theory presented in Chapter 5. However, the stage in the development process in which you create the tests does differ. Nonetheless, XT and traditional testing still have the same goal: to identify errors in a program.
The rest of this section provides more information on unit testing and acceptance testing, from an Extreme Programming perspective.
8.2.1. Extreme Unit Testing
Unit testing is the primary testing approach used in Extreme Testing and has two simple rules: All code modules must have unit tests before coding begins, and all code modules must pass unit tests before being released into production. At first glance this may not seem so extreme. However, the big difference between unit testing, as previously described, and XT is that the unit tests must be defined and created before coding the module.
Initially, you may wonder why you should, or how you can, create test drivers for code you haven't even written. You may also think that you do not have time to create the tests because the application must meet a deadline. These are valid concerns, but they are easily addressed. The following list identifies some benefits associated with writing ...
Get The Art of Software Testing, Second Edition 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.