@TestFor not found in Grails 3.3.0

72 views
Skip to first unread message

Brad Whitaker

unread,
Jul 26, 2017, 8:14:09 PM7/26/17
to Grails Dev Discuss
@TestFor and @Mock aren't found when I create a fresh app project. test-app fails during compilation of a generated Spec. It looks like 'grails-plugin-testing' isn't included in 3.3.0. What is the fix for this?

Chris Rosburg

unread,
Jul 27, 2017, 4:24:51 AM7/27/17
to grails-de...@googlegroups.com
I guess you have to use the new trait based test framework. Please refer to the docs (see the what's new section)

Von meinem iPhone gesendet

Am 27.07.2017 um 02:14 schrieb Brad Whitaker <dbwhi...@gmail.com>:

@TestFor and @Mock aren't found when I create a fresh app project. test-app fails during compilation of a generated Spec. It looks like 'grails-plugin-testing' isn't included in 3.3.0. What is the fix for this?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8fd3901d-71ea-479a-bbfe-ab61fc222c9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergio del Amo Caballero

unread,
Jul 28, 2017, 7:08:10 AM7/28/17
to Grails Dev Discuss
Check http://testing.grails.org you will find instructions to migrate your tests. It is really simple

Bobby Warner

unread,
Jul 31, 2017, 10:53:25 AM7/31/17
to Grails Dev Discuss
You have to include the "mixins" dependency in your 3.3 app.  There currently isn't a 3.3.0 final release of this dependency, but you can use the RC1 version that's available.


testCompile "org.grails:grails-test-mixins:3.3.0.RC1"


Thanks,
Bobby
Reply all
Reply to author
Forward
0 new messages