Skip to content

Features

Aaron edited this page Nov 16, 2015 · 5 revisions

Supported Features

Auto generation of grails property types, including:

  • Domain objects using one-to-one, one-to-many, and many-to-many relationships.
  • Embedded Domain Objects
  • String
  • Date
  • Boolean
  • Number (Integer, Long, Float, Short, etc)
  • Byte
  • JodaTime classes
  • Any other persistable class with a zero-argument constructor

Most of the built-in grails constraints, including:

Constraints not directly supported:

  • scale
  • validator - custom validators can have all kinds of business logic in them and there isn't a programmatic way to interrogate this. If the test value that's tried doesn't pass your logic, you'll need to provide a value, or mock out the calls that the validator makes so that it passes.
  • unique - not directly supported but it's possible to specify your own unique value in a config file as demonstrated on the [Sample Code](Sample Code) page.
  • notEqual - unlikely that our test data would match this, could be supported in the future

A sample value will be tried for these constraints, but is not guaranteed to work. If the generated value doesn't work, default test data values can be given at the domain class level in a TestDataConfig.groovy file or as a parameter to the build method.

  • TestDataConfig file support, the config file can be used to provide default constructor values for properties if the plugin isn't giving you the values that you want