Login required
Download

Build Test Data

(5)
Author(s): Ted Naleid and Joe Hoover
Current Release: 1.0.2
Grails Version: ?
Tags data domain testing
grails install-plugin build-test-data
This plugin allows the user to easily create testing data through the use of a "build" method that is added to all Domain Classes. The build method inspects all of the constraints and creates default values for those required properties.

This testing data is much more robust as it changes with the domain classes when new properties and constraints are added. The only tests that will break are the ones directly related to the changes you're making, rather than any test using any part of that domain class.

See the Official Docs for detailed documentation and code samples.

I've also created a blog post showing some of the details of the initial build-test-data release

I've also created a presentation for build-test-data that I presented to the Groovy Users of Minnesota .

UPDATE: For some reason, the "Built on Grails" version above is getting blanked out (and I have it set in my plugin descriptor). The plugin was created for Grails 1.1.1, though it's possible that it will work with earlier versions as I'm not aware of anything that we did that was 1.1.1 specific. It has also been tested on grails 1.2 milestones and works without problem.