I'm starting with testing for Grails (version 2.2.4).
When I run: grails test-app
I got:
Error Compilation error compiling [unit] tests: startup failed:
Log:
/myproject/test/unit/app/AutocompleteServiceTests.groovy: 11: Only classes and closures can be used for attribute 'value' in @grails.test.mixin.TestFor
@ line 11, column 10.
@TestFor(AutocompleteService)
/myproject/test/unit/app/CoachControllerTests.groovy: 11: Only classes and closures can be used for attribute 'value' in @grails.test.mixin.TestFor
@ line 11, column 10.
@TestFor(CoachController)
I have 21 errors, one per each *Test.groovy file.
I tried: grails clean before, but I have the same error.
The Test files was created autmatically by Grails when I create new Domain, Controller or Service.
I found the problem.
I have unit test for models or controllers that was deleted, renamed or changed package.
I deleted all the unit test files and I created each one manually and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With