0

I create a project with grails 2.2.2, add

test "org.seleniumhq.selenium:selenium-firefox-driver:2.28.0"
test "org.seleniumhq.selenium:selenium-support:2.31.0"
test "org.gebish:geb-spock:0.9.0"
test "org.gebish:geb-junit4:0.9.0"
test "org.spockframework:spock-grails-support:0.7-groovy-2.0"

in dependencies in BuildConfig.groovy and

test ":geb:0.9.0"
test(":spock:0.7") {
    exclude "spock-grails-support"
}

in plugins in BuildConfig.groovy.

Then I create the functional folder in test folder (add it to classpath), create GebConfig.groovy inside with

import org.openqa.selenium.firefox.FirefoxDriver
driver = {
    def driver = new FirefoxDriver()
driver
}
baseUrl = "http://localhost:8080/TestGebSpock/"

I don't create any test whatsoever, just run the test :

test-app :functional

I got this stacktrace and no information about it on the net :

Loading Grails 2.2.2
| Environment set to test.....
| Packaging Grails application.....
| Tests FAILED  - view reports in /Users/Fiftoine/workspace/TestGebSpock/target/test-reports
| Error java.lang.NullPointerException
| Error     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| Error     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

Full stacktrace here : http://pastebin.com/CKtzNJtN

Did anyone have had this error before and solved it? Any help would be appreciated as this is quite simple to reproduce...

Thanks in advance

Fiftoine
  • 271
  • 5
  • 17
  • What happens if you create one simple test that don't do so much? –  Aug 09 '13 at 02:02
  • For unit or intergation tests, I don't have any problem. I just need to setup the functional tests... – Fiftoine Sep 20 '13 at 08:56
  • Check this [pull request](https://github.com/geb/geb-example-grails/pull/8) it's an working example with Grails 2.2 –  Sep 22 '13 at 01:23

0 Answers0