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

Closed
arief-hidayat opened this Issue Jul 13, 2011 · 6 comments

Comments

Projects
None yet
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

@ldaley

This comment has been minimized.

Show comment
Hide comment
@ldaley

ldaley Jul 13, 2011

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.

Owner

ldaley commented Jul 13, 2011

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.

@ldaley ldaley closed this Jul 13, 2011

@arief-hidayat

This comment has been minimized.

Show comment
Hide comment
@arief-hidayat

arief-hidayat Jul 13, 2011

thanks. I'll try it.

thanks. I'll try it.

@arief-hidayat

This comment has been minimized.

Show comment
Hide comment
@arief-hidayat

arief-hidayat Jul 13, 2011

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?

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?

@ldaley ldaley reopened this Jul 13, 2011

@ldaley

This comment has been minimized.

Show comment
Hide comment
@ldaley

ldaley Jul 15, 2011

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?

Owner

ldaley commented Jul 15, 2011

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

This comment has been minimized.

Show comment
Hide comment
@arief-hidayat

arief-hidayat Jul 15, 2011

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

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

@ldaley ldaley closed this Jul 20, 2011

@arief-hidayat

This comment has been minimized.

Show comment
Hide comment
@arief-hidayat

arief-hidayat Jul 30, 2011

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.

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