Login required
Download

Build Test Data Plugin

(14)
Used by approximately
3%
of Grails users
Author(s) Ted Naleid and Joe Hoover
Current Release 1.1.2   (1 month ago)
Grails Version 1.2.0 > *
Tags data  domain  testing 
Dependency
compile ":build-test-data:1.1.2"
Enables the easy creation of test data by automatic inspection of constraints. Any properties that are required have their constraints examined and a value is automatically provided for them.

It is intended to be used in integration tests to enable the test creator to specify the values that are under test, but so that they can ignore the other values not under test and not need to worry about creating dummy data that is not pertinent.

Last updated by admin 2 years ago
grails install-plugin build-test-data
Last updated by tednaleid 1 year ago
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 "Grails Version" above is getting blanked out (and I have it set in my plugin descriptor). The plugin was initially created for grails 1.1.1, but has been updated and tested for everything through grails 1.3.2. See the Release Notes for the latest information and upgrade instructions.

Last updated by admin 2 years ago
Last updated by admin 2 years ago