There are two approaches to automated testing. One is to add special testing processes to create/update/delete objects as necessary to test the application logic. An example of this approach can be seen in the Library sample application that uses several initialization processes to populate the application with sample data.
The other approach can be used when the amount of testing data is such that it is tedious/impractical to create testing processes. The approach is to import testing data from CSV files. Note that in addition to creating new objects by importing CSV files it is possible to change attributes of existing objects. It is also possible in an import file to specify links to related object instances, which the system will establish during import. An example of this approach can be seen in the Ordering sample application that imports several CSV files in its initialization process to populate the application with sample data.