Types of Automated Testing
A variety of different types of automated testing can be conducted, and Ant can be used to integrate most, if not all, of them. These tests can be used to check the quality of every aspect of the project. Some of the types of testing that can be automated as part of the Ant build process include
UnitVerifies that certain parts of the code are working properly. It is not an overall system test.
FunctionalUsed to test the usability of the system. This type of testing is also known as "black box testing" because the testing is conducted with no knowledge of how the code was implemented.
AcceptanceUsed to determine if all of the requirements have been met. These are the requirements defined by the customer in the form of user stories.
RegressionVerifies that previously working parts of the system are still working after changes have been made.
PerformanceVerifies that the components of the systems meet the stated requirements for speed.
LoadStresses a system to test how it will behave under heavy use. A system that works well with one user may completely break down with several hundred or more users. Load testing helps to evaluate how well a system holds up under heavy use.
If your project is not using any form of automated testing currently, we highly recommend it. A great sense of accomplishment comes when a job has been done well. Testing allows success to be quantified and measured. By automating the test, you have the added benefit of being able to easily repeat the test.
In this chapter, we focus on unit testing. Unit testing is an important part of the XP process. Of all the types of automated testing, this is the one that should get the most use because developers should be running these tests at least daily, if not more frequently. Developers should also be writing new tests for all new code that they write and all changes that they make. It has been our experience that this also is an area of testing that many teams overlook or do not adequately implement. An organization might have experience with integration or performance testing, but unit testing often falls by the wayside.