Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unable to open URL (404) and pass option geb.env #2

Closed
arief-hidayat opened this Issue · 6 comments

2 participants

@arief-hidayat

Hi,
Thanks for your work on this promising plugin. I tried it but failed.
I hope you can help give an answer to:
http://stackoverflow.com/questions/6660638/how-to-pass-grails-test-with-geb-and-spock-using-grails-functional-test-develop

The other thing that I notice. I couldn't pass the option:
-Dgeb.env=chrome

I use the -Dgeb.env=chrome to use Chrome as driver.
This is the command: "grails develop-functional-tests -Dfile.encoding=UTF-8 -Xms256m -Xmx1024m -XX:MaxPermSize=256m -Dgeb.env=chrome".

And it seems the plugin still using the default driver instead.

Thanks

@alkemist
Owner

You have to specify the options to the test run, not the initial invocation.

So…

grails develop-functional-tests

wait for bootstrapping

Then at command prompt:

-Dfile.encoding=UTF-8 -Xms256m -Xmx1024m -XX:MaxPermSize=256m -Dgeb.env=chrome

This sets the properties on the test run, which is what you want.

@alkemist alkemist closed this
@arief-hidayat

thanks. I'll try it.

@arief-hidayat

I found the issue.

I guess the Chrome driver is not working. So, it's not opening chrome web browser.
If I use Firefox driver " -Dgeb.env=firefox" it's fine.

But the next problem is that it could not open the URL (status: 404). and all my test failed.

If I don't use your plugin and directly run "grails test-app -functional", the firefox can open the URL and run my next test script.

Any idea what could be the possible culprit?

@alkemist alkemist reopened this
@alkemist
Owner

If the urls are the same, the application may have failed to start up.

Are the urls it's trying to access the same?

@arief-hidayat

yes. it refers to ''localhost:8080". so for test, I need to change the port to something else? I'll try this. thanks

@alkemist alkemist closed this
@arief-hidayat

It works just by keying in "-Dserver.port=8081 all".
Other minor thing is that I couldn't increase the maxPermSize from console. So, I ended up adding
javaOpts << "-Xmx1024m" << "-Xms256m" << "-XX:MaxPermSize=256m"
to method "createGrailsProcessBuilder".

Sorry for late response back. I was push to other project last week. Just have time to try this plugin again today.

and thanks for this useful tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.