Grails

create-integration-test and create-unit-test fail with MissingPropertyException

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.3.4
  • Fix Version/s: 1.3.5
  • Component/s: Project infrastructure
  • Labels:
    None
  • Environment:
    Ubuntu 10.04

Description

With a fresh Grails 1.3.4 installation, running "create-integration-test" or "create-unit-test" fails with a missing property exception.

Steps to repeat issue...

grails create-app Test134
grails create-domain-class User
grails create-integration-test User

Error executing script CreateIntegrationTest: No such property: type for class: CreateIntegrationTest
No such property: type for class: CreateIntegrationTest
	at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:387)
	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
	at gant.Gant.withBuildListeners(Gant.groovy:427)
	at gant.Gant.this$2$withBuildListeners(Gant.groovy)
	at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
	at gant.Gant.dispatch(Gant.groovy:415)
	at gant.Gant.this$2$dispatch(Gant.groovy)
	at gant.Gant.invokeMethod(Gant.groovy)
	at gant.Gant.executeTargets(Gant.groovy:590)
	at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: groovy.lang.MissingPropertyException: No such property: type for class: CreateIntegrationTest
	at CreateIntegrationTest$_run_closure1.doCall(CreateIntegrationTest.groovy:34)
	at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
	... 10 more
--- Nested Exception ---
groovy.lang.MissingPropertyException: No such property: type for class: CreateIntegrationTest
	at CreateIntegrationTest$_run_closure1.doCall(CreateIntegrationTest.groovy:34)
	at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
	at gant.Gant.withBuildListeners(Gant.groovy:427)
	at gant.Gant.this$2$withBuildListeners(Gant.groovy)
	at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
	at gant.Gant.dispatch(Gant.groovy:415)
	at gant.Gant.this$2$dispatch(Gant.groovy)
	at gant.Gant.invokeMethod(Gant.groovy)
	at gant.Gant.executeTargets(Gant.groovy:590)
	at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script CreateIntegrationTest: No such property: type for class: CreateIntegrationTest

I was able to resolve the error by adding the following line to the scripts/CreateIntegrationTest.groovy and scripts/CreateUnitTest.groovy files.

CreateIntegrationTest.groovy
...
target ('default': "Creates a new Grails integration test which loads the whole Grails environment when run") {
    depends(checkVersion, parseArguments)

    def type = "Tests"
    promptForName(type: "Integration test")

    def name = argsMap["params"][0]
    name = purgeRedundantArtifactSuffix(name, type)
    createIntegrationTest(name: name, suffix: "")
}

Issue Links

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: