General testing functionality
Gosu has several features that are used to create and manipulate test data. The features are used by the Behavior Testing Framework base configuration, but they are not exclusive to Behavior Testing Framework. They are discussed in detail in other areas of the documentation.
Developers who intended to write implementation code for Behavior Testing Framework need to have a good understanding of these features.
Test data builders
A test data builder is a Gosu class that can be used to build entity objects for testing purposes. Test data builders simplify the work of creating and committing data for test purposes. For more information on using test data builders, see Using test data builders. For more information on extending or creating test data builders, see Creating an entity builder.
Database transactions and Gosu bundles
A database transaction is a set of one or more SQL steps that are processed as a unit. All statements in a transaction must succeed before the transaction can be committed. If any one statement fails, the entire transaction is rolled back.
A bundle is a Gosu object that is used to manage a database transaction. Within Gosu, you can manually create bundles, add objects to bundles, and commit bundles. Gosu internally creates the appropriate SQL statements to create and commit database transactions as needed.
For more information on Gosu bundles, refer to the Gosu Reference Guide topic on database transactions and bundles.
