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 unit tests before you start coding the application.
• You gain confidence that your code will meet its specification.
• You express the end result of your code before you start coding.
• You better understand the application’s specification and requirements.
• You may initially implement simple designs and confidently refactor the code later to improve performance without worrying about breaking the specification.