Chapter 5. Working with test data
This chapter covers
- Retrieving test data from system properties
- Retrieving test data from environment variables
- Retrieving test data from files on disk
- Retrieving test data from a database
- Managing test data using such tools as Ant, JUnitPP, and DbUnit
Object-oriented software deals with data and behavior. If you are going to test most software prior to releasing it to users or into a production environment, you need test data to simulate inputs that trigger behavior you expect to occur when the software works correctly. Software is commonly written for transforming input data into different output data. You cannot test whether the system outputs the correct output data, usually, without providing it with test input data. Software can also be designed to generate answers from digested input data or to manage data storage and retrieval. Obviously, testing these software behaviors require a lot of test data.