wantsomezen
2014-04-09 23:00:17 UTC
Grails newbie trying to run through the examples. Using Grails 2.3.7 and
Groovy 2.0
run-app works fine, but for some reason. The tests are not getting run.
dump and code that I modified below.
grails> create-unit-test first
| Created file test/unit/tapp2/FirstSpec.groovy
grails> run-app
| Server running. Browse to http://localhost:8080/tApp2
| Application loaded in interactive mode. Type 'stop-app' to shutdown.
| Enter a script name to run. Use TAB for completion:
grails> test-app
| Running without daemon...
................................................
|Compiling 2 source files
.
|Running 2 unit tests...
|Running 2 unit tests... 1 of 2
Failure: |
initializationError(org.junit.runner.manipulation.Filter)
|
java.lang.Exception: No tests found matching grails test target pattern
filter from org.junit.runner.Request$***@ee5d13
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 C:\mroot\gplay\projects\tApp2\target\test-reports
| Error Forked Grails VM exited with error
| Error Error running script test-app:
org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see
the full trace)
grails>
grails> test-app
| Running without daemon...
................................................
|Compiling 2 source files
.
|Running 2 unit tests...
|Running 2 unit tests... 1 of 2
Failure: |
initializationError(org.junit.runner.manipulation.Filter)
|
java.lang.Exception: No tests found matching grails test target pattern
filter from org.junit.runner.Request$***@19a12ee
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 C:\mroot\gplay\projects\tApp2\target\test-reports
| Error Forked Grails VM exited with error
| Error Error running script test-app :
org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see
the full trace)
package tapp2
import grails.test.mixin.TestFor
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for
usage instructions
*/
@TestFor(MyController)
class MyControllerSpec extends Specification {
def setup() {
println "sss"
}
def cleanup() {
println "ccc"
}
void "test something 222"() {
println "slkjf"
}
}
package tapp2
import grails.test.mixin.TestMixin
import grails.test.mixin.support.GrailsUnitTestMixin
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for
usage instructions
*/
@TestMixin(GrailsUnitTestMixin)
class FirstSpec extends Specification {
def setup() {
println "first setup"
}
def cleanup() {
println "first cleanup"
}
void "test something"() {
println "test something "
}
}
--
View this message in context: http://grails.1312388.n4.nabble.com/tests-for-new-project-not-getting-found-or-run-correctly-tp4655870.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Groovy 2.0
run-app works fine, but for some reason. The tests are not getting run.
dump and code that I modified below.
grails> create-unit-test first
| Created file test/unit/tapp2/FirstSpec.groovy
grails> run-app
| Server running. Browse to http://localhost:8080/tApp2
| Application loaded in interactive mode. Type 'stop-app' to shutdown.
| Enter a script name to run. Use TAB for completion:
grails> test-app
| Running without daemon...
................................................
|Compiling 2 source files
.
|Running 2 unit tests...
|Running 2 unit tests... 1 of 2
Failure: |
initializationError(org.junit.runner.manipulation.Filter)
|
java.lang.Exception: No tests found matching grails test target pattern
filter from org.junit.runner.Request$***@ee5d13
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 C:\mroot\gplay\projects\tApp2\target\test-reports
| Error Forked Grails VM exited with error
| Error Error running script test-app:
org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see
the full trace)
grails>
grails> test-app
| Running without daemon...
................................................
|Compiling 2 source files
.
|Running 2 unit tests...
|Running 2 unit tests... 1 of 2
Failure: |
initializationError(org.junit.runner.manipulation.Filter)
|
java.lang.Exception: No tests found matching grails test target pattern
filter from org.junit.runner.Request$***@19a12ee
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 C:\mroot\gplay\projects\tApp2\target\test-reports
| Error Forked Grails VM exited with error
| Error Error running script test-app :
org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see
the full trace)
package tapp2
import grails.test.mixin.TestFor
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for
usage instructions
*/
@TestFor(MyController)
class MyControllerSpec extends Specification {
def setup() {
println "sss"
}
def cleanup() {
println "ccc"
}
void "test something 222"() {
println "slkjf"
}
}
package tapp2
import grails.test.mixin.TestMixin
import grails.test.mixin.support.GrailsUnitTestMixin
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for
usage instructions
*/
@TestMixin(GrailsUnitTestMixin)
class FirstSpec extends Specification {
def setup() {
println "first setup"
}
def cleanup() {
println "first cleanup"
}
void "test something"() {
println "test something "
}
}
--
View this message in context: http://grails.1312388.n4.nabble.com/tests-for-new-project-not-getting-found-or-run-correctly-tp4655870.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email