Quantcast

Integration Tests with Grails-2.0.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Integration Tests with Grails-2.0.0

Sandro Martini
Hi all,
trying to make some integration test I get some errors at runtime, even with an empty (only Grails-generated) code.

This is my environment:
Microsoft Windows [Version 5.2.3790]

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

Grails version: 2.0.0


These are steps:

grails create-app test
cd test

grails create-integration-test test.empty
Optional, to avoid class name collisions, rename generated file in EmptyIntegrationTests.groovy, and fix inside the source

grails create-unit-test test.empty
Optional, to avoid class name collisions, rename generated file in EmptyUnitTests.groovy, and fix inside the source

grails test-app
I get:
| Failure:  testSomething(test.EmptyUnitTests)
|  java.lang.AssertionError: Implement me
        at org.junit.Assert.fail(Assert.java:91)
        at test.EmptyUnitTests.testSomething(EmptyUnitTests.groovy:24)
OK, this is the expected behaviour.

but even this:
| Failure:  testSomething(test.EmptyIntegrationTests)
|  groovy.lang.MissingMethodException: No signature of method: org.codehaus.groo
vy.grails.test.junit4.runner.GrailsTestCaseRunner.rules() is applicable for argu
ment types: (test.EmptyIntegrationTests) values: [test.EmptyIntegrationTests@127
7b59]
Possible solutions: use([Ljava.lang.Object;), run(org.junit.runner.notification.
RunNotifier), run(org.junit.runner.notification.RunNotifier), dump(), grep(), use(java.util.List, groovy.lang.Closure)
        at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at TestApp$_run_closure4.doCall(TestApp:285)
        at TestApp$_run_closure2.doCall(TestApp:243)
        at TestApp$_run_closure1_closure21.doCall(TestApp:190)
        at TestApp$_run_closure1.doCall(TestApp:179)
        at TestApp$_run_closure1.doCall(TestApp.groovy:82)
| Completed 1 integration test, 1 failed in 156ms

How/what can i do to fix this ? Does exist at least a workaround for now (is possible without using deprecated classes) ?
I think that generated code should give an error like in the Unit Test case ... should I open a issue in JIRA ?

I have seen that there is already this issue ( http://jira.grails.org/browse/GRAILS-7641 ) but already closed.

Thank you very much,
Sandro Martini
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Integration Tests with Grails-2.0.0

burtbeckwith
Please ask usage questions on the User list.

Burt

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Integration Tests with Grails-2.0.0

Sandro Martini
Hi Burt,

>Please ask usage questions on the User list.
I'll do it ...

My only trouble here is to ask to Grails Developers if the current behaviour with just-generated Integration Tests is good as default, or if they should at least run giving a fail error, like in Unit Tests.

Thank you again, and sorry it this is not the right place,
Sandro

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Integration Tests with Grails-2.0.0

burtbeckwith
The developers watch the user list too. The dev list is for discussing development of Grails itself.

Burt

On Tuesday, December 27, 2011 08:02:33 AM Sandro Martini wrote:

> Hi Burt,
>
> >Please ask usage questions on the User list.
> I'll do it ...
>
> My only trouble here is to ask to Grails Developers if the current behaviour
> with just-generated Integration Tests is good as default, or if they should
> at least run giving a fail error, like in Unit Tests.
>
> Thank you again, and sorry it this is not the right place,
> Sandro
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Integration-Tests-with-Grails-2-0-0-tp4237239p4237421.html


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...