title: Grails Unit Test Exception java.lang.Exception: No tests found matching grails test target pattern filter
body: <p>I am just starting to learn Grails testing and I tried to write my first grails test.For this, I created a fresh grails project and created a controller named com.rahulserver.SomeController:</p>
  
  <pre><code>package com.rahulserver
  
  class SomeController {
  
      def index() { }
      def someAction(){
  
      }
  }
  </code></pre>
  
  <p>When I created this controller, grails automatically created a com.rahulserver.SomeControllerSpec under test/unit folder. 
  Here is my SomeControllerSpec.groovy:</p>
  
  <pre><code>package com.rahulserver
  
  import grails.test.mixin.TestFor
  import spock.lang.Specification
  
  /**
   * See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for usage instructions
   */
  @TestFor(SomeController)
  class SomeControllerSpec extends Specification {
  
      def setup() {
      }
  
      def cleanup() {
      }
  
      void testSomeAction() {
          assert 1==1
      }
  }
  </code></pre>
  
  <p>When I right click this class, and run this test, I get following:</p>
  
  <pre><code>Testing started at 5:21 PM ...
  |Loading Grails 2.4.3
  |Configuring classpath
  .
  |Environment set to test
  ....................................
  |Running without daemon...
  ..........................................
  |Compiling 1 source files
  .
  |Running 1 unit test...|Running 1 unit test... 1 of 1
  --Output from initializationError--
  Failure:  |
  initializationError(org.junit.runner.manipulation.Filter)
   |
  java.lang.Exception: No tests found matching grails test target pattern filter from org.junit.runner.Request$1@1f0f9da5
      at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
  No tests found matching grails test target pattern filter from org.junit.runner.Request$1@1f0f9da5
  java.lang.Exception: No tests found matching grails test target pattern filter from org.junit.runner.Request$1@1f0f9da5
      at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
  
  |Completed 1 unit test, 1 failed in 0m 0s
  .Tests FAILED 
  |
   - view reports in D:\115Labs\grailsunittestdemo\target\test-reports
  Error |
  Forked Grails VM exited with error
  
  Process finished with exit code 1
  </code></pre>
  
  <p>So why is it failing?</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>I am using grails 2.4.3</p>