Plugins You can find out about all the publicly available Grails plugins.

Build Test Data Plugin

  • Tags: testing, data, domain
  • Latest: 2.4.0
  • Last Updated: 06 February 2015
  • Grails version: 2.4.0 > *
  • Authors: Ted Naleid, Joe Hoover, Matt Sheehan, Aaron Long, Søren Berg Glasius, Gregor Petrin, Michael Cameron, Jaime Garcia
  • License: Apache License 2.0
25 votes

5% of Grails users

test ":build-test-data:2.4.0"

 Documentation  Source  Issues


Enables the easy creation of test data by automatic inspection of constraints. Any properties that are required havetheir constraints examined and a value is automatically provided for them.


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.

NOTE: version 2.4.0 is for Grails 2.4.x, for Grails 3.x and later, please use 3.0.0 available at: