Search⌘ K
AI Features

Testing and Some Plugins

Explore how to implement unit testing in Grails using annotations like @TestFor and @Mock for classes under test. Understand the use of caching plugins such as Cache-ehcache, Cache-redis, and Cache-gemfire with @Cacheable annotations. Learn to use the Grails wrapper for consistent environment setup across teams. This lesson enables you to test various Grails components and manage plugins effectively.

We'll cover the following...

Testing

Grails supports unit testing with a mixin approach. Annotations:

  • @TestFor(X): Specifies the class under test.
  • @Mock(Y): Creates a Mock for the given class.

For tests GORM provides an ...