I have a need to generate meaningful test data programatically using either Java or Groovy (Groovy preferred). The data I need includes First Name, Middle Name, Last Name, Address (City, Postal Code, Country, Street), Phone, Email. It would be great if I could add my own logic to the library to address my custom needs for example data for Credit Card or Bank Account, etc.
Could someone guide me in the right direction?
For Grails you can use the fixtures and the build-test-data plugin.
The fixtures plugin provides a DSL for creating the test data with specific property values. While the test data plugin will fill in all values that you did not assign explicitly, in such a way that all property values comply to the constraints set.