Skip to content

Release Notes

Aaron edited this page Jan 6, 2018 · 2 revisions

build-test-data 0.1

  • initial release of plugin

build-test-data 0.1.1 - 4-20-2009

  • changed service name (and name needed to log info about what's getting built) to BuildTestDataService
  • fixed issue 8: nullable belongsTo properties will now not throw an NPE if a value is not generated for them

build-test-data 0.1.2 - 4-29-2009

build-test-data 0.2 - 6-12-2009

  • Updated for use with Grails 1.1.1/Groovy 1.6.3

  • Added support for JodaTime as well as any other class that can be persisted that has a zero-arg constructor

  • Modified the way config files work. See TestDataConfig for examples. Lists of values that are iterated through are no longer supported, instead you now can either specify a static value that's always returned (the norm by far), or a closure that gets called and can generate values. The previous approach had a couple of weaknesses (tests run out of order gave back different values, and could run out of values when the end of the list was hit).

  • Changed build method signature, previously there was an optional boolean 2nd parameter that determined whether we saved or not. Refactored this into a different method called buildWithoutSave():

    build(mapOfParameters, false)

now becomes this in 0.2:

buildWithoutSave(mapOfParameters)

If you were never passing this optional second parameter, you shouldn't need to change anything.

  • Refactored constraint handers each into their own classes rather than just being closures in the service

  • Extracted DomainInstanceBuilder from BuildTestDataService to make things more object oriented. This class more naturally holds meta information that we need to build instances of a particular domain class type (rather than just having everything in scope through closure rules)

  • installation/upgrade modified so that we don't automatically install (or ask if you want to overwrite) the grails-app/conf/TestDataConfig.groovy file. Asking the question if the file existed was causing issues with some automated build processes. Instead, there's now a new grails script that will install the template:

    grails install-build-test-data-config-template

  • a number of other bugfixes

build-test-data 0.2.1 - 6-12-2009

  • bugfix for issue 22 - prevented boolean and numeric values that were "false" according to "groovy truth" to be saved (ie: 0 and false)

build-test-data 0.2.2 - 7-14-2009

  • Issue 27 - enhancement - added "enabled" flag to config file. Default is true, but if set to false the plugin will be disabled in that environment.
  • Issue 26 - bug fix - fixed issue where a subclass domain with a superclass in a belongsTo relationship had issues
  • Issue 23 - bug fix - removed superfluous css, image, and tld files that are automatically added by grails but not needed for build-test-data

build-test-data 0.2.3 - 8-25-2009

  • Issue 28 - bug fix - problem with enums with "get" method cause exception
  • bugfix - report/patch from Robert Fletcher so that the config file overrides default values in the domain class (but that values passed in to build method trump both of those)

build-test-data 1.0 3-17-2010

  • Issue 29 - no longer need to manually refresh() an existing Author's collection of books when we build() a new book for that author
  • other minor bug fixes and tweaks
  • officially released under the Apache 2.0 license

build-test-data 1.0.1 3-17-2010

  • small fix to indicate that plugin will work for grails 1.2 and not just 1.2.1

build-test-data 1.0.2 3-18-2010

  • patch from jbarmash merged in fixing issue #30 and adding support for nested properties

build-test-data 1.1.0 4-4-2010

  • added buildLazy(Map) method that will find existing matching objects and will only create if no matches are found

build-test-data 1.1.1 6-26-2010

  • added builder support for hasOne relationships
  • added fix for issue 38, now allows defaulted boolean values to be false, and numeric values to be 0. These are actually the new defaults for these values if not specified (rather than true and 1). If you want true/1 to be default, they can be set in the TestDataConfig.groovy file

build-test-data 1.1.2 12-17-2011

  • upgraded to be fully compatible with Grails 2.0.0 (I believe it's still as backwards compatible as it was previously)
  • a number of bugfixes including issues #46 (remove hibernate dependency in plugin), #47 (contribution from isinev to enable more support of embedded objects), & #48 (remove dependency of GrailsMockErrors as grails 2.0 no longer includes it in war files)

build-test-data 2.0.0 2-9-2012

  • added build-test-data support for unit tests (thanks to the work of Matt Sheehan)
  • known issues in grails 2.0.0 that affect BTD but we can't fix:
  • grails doesn't cascading save on one-to-one relationships (Face.build() will create but won't save Nose): http://jira.grails.org/browse/GRAILS-8590 - fixed in grails 2.0.1
  • grails saving a many-to-many will cause a stack overflow, will only affect BTD if your validation sets a minSize on a many-to-many relationship - http://jira.grails.org/browse/GRAILS-8747 - fixed in grails 2.0.1
  • running tests in grails interactive mode doesn't clean up the metaclass - http://jira.grails.org/browse/GRAILS-8748 - fixed in grails 2.0.1

build-test-data 2.0.1 2-22-2012

  • bugfix release to get things compatible with grails 2.0.1 regressions
  • fixes issues #39, #52, #44, also added test for issue #51 which turned out to be a grails issue http://jira.grails.org/browse/GRAILS-8815, currently broken in grails
  • fixed triangle relationship issues, which had the side effect of speeding things up as we're doing a lot less saving than we were previously as BTD works

build-test-data 2.0.2 3-10-2012

  • a few bugfixes related to the unit test annotations

build-test-data 2.0.3 7-6-2012

  • pull request #3 from @longwa - adds support for matches constraint via the xeger library
  • pull request #2 from @longwa - adds support for assigned and composite identity; add support for building out abstract classes by finding concrete subclasses
  • tested with grails 2.0.1, 2.0.3, 2.0.4 and 2.1.0

build-test-data 2.0.4 2-10-2013

  • pull request #4 from @longwa - Allow build for domain classes that reference Abstract classes
  • pull request #5 from @tomdcc - Allow TestDataConfig closures to see values from specified properties or earlier-run closures

build-test-data 2.0.5 4-20-2013

  • fix compatibility issues with Grails 2.1.4 and later (see http://grails.org/2.1.4%20Release%20Notes)
  • performance improvements to both unit tests and integration tests
  • fix various issues with assigned keys and mocking of abstract classes
  • tested with 2.1.2, 2.1.4, and 2.2.1

build-test-data 2.0.6 9-29-2013

build-test-data 2.0.7 11-03-2013

  • removed dependency on deprecated Grails ApplicationHolder (fixed #9)
  • took out graph logger which wasn't thread safe (fixes #11)
  • added checks to ensure that log level was appropriate before evaluating groovy strings

build-test-data 2.0.8 11-14-2013

  • sort subclass lookup by classname to prevent randomness for polymorphic associations
  • add ability to specify transitive dependencies in unit tests (fixes #12)
  • add ability to specify a default concrete class when building abstract classes (fixes #13

build-test-data 2.0.9 12-08-2013

  • A fix that was intended to be part of 2.0.8 (fixes #18)

build-test-data 2.1.0 02-03-2014

  • Updated to support Lists/Collections (bags) hasMany relationships that have a min-size, previously only supported Sets (the default)

build-test-data 2.1.1 02-04-2014

  • fixed issue uncovered by list support where we were double adding to collections when we didn't need to, worked OK with sets as they were already unique, Lists/Collections were getting duplicates

build-test-data 2.1.2 03-05-2014

  • enhancement to allow TestDataConfig.groovy to have an alternate name with Config.groovy override, ex: grails.buildtestdata.testDataConfig = "AlternativeTestDataConfig"

build-test-data 2.2.0 08-15-2014

  • adds support for HibernateTestMixin and MongoDbTestMixin, really any mixin that uses the @Domain annotation in unit tests. Upgraded all plugin and test plugin apps to grails 2.4.3.

build-test-data 2.2.1 09-20-2014

  • fixes #38 - now handles circular reference for class heirarchy and will not double create objects in situations where you're using table-per-subclass/table-per-hierarchy.

build-test-data 2.2.2 10-07-2014

  • support for java.sql.Timestamp

build-test-data 2.2.3 2015-01-15

  • convert to java circular reference class to avoid Java7/Java8 issues

build-test-data 2.4.0 2015-02-06

  • Now requires grails 2.4+ because of some underlying optimizations that don't exist in earlier grails
  • if you're on grails < 2.4 (but greater than 2.0), you can use compile ":build-test-data:2.2.3", that's the last version that works with pre grails 2.4

build-test-data 3.0.1 2016-10-01

  • Support for Grails 3

build-test-data 3.3.0 2018-01-08

  • Support for Grails 3.3
  • Major cleanup of DomainInstanceBuilder
  • Performance improvements including mostly CompileStatic