The software we write is constantly being tested—at least we hope it is. That is because every time someone uses a piece of code, a class, or a website you created, he or she is implicitly testing it as well. We will take a look at the different types of testing that are performed during a typical software development cycle.
One thing that types of testing have in common is that their goal is to ferret out problems with the software. The earlier we are able to catch a bug, the cheaper it is to fix it. If the developer can find, diagnose, and fix a bug during the development stage, it will happen much faster than if it happens during user acceptance testing when the client gets his hands on the final product. As we will see later in the chapter, once unit tests have been set up, it is relatively cheap to run them; whereas, it is fairly expensive if a problem gets uncovered during regression or integration testing. One reason for that is because the former test is automated...