This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Groovy and the fly likes Geb testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Geb testing" Watch "Geb testing" New topic
Author

Geb testing

Jozo Stan
Greenhorn

Joined: Aug 18, 2012
Posts: 12
Hi,

I have an application developed in ggts with grails/groovy and there are users with different roles. I want to test if a user can access some parts of the application by directly inserting link into address bar. So, where is my problem? When I test my application on localhost, everything is OK. But when I want to test through http://myapp then it isn't OK. The application is the same.

Here is my code:

LoginSpec.groovy




ProductPage.groovy



config.grails.serverURL should be http://myapp.


When I start the test, it opens http://myapp/login, the user logs in and the home page opens. But then it stays on home page. It should go to http://myapp/shop/catalog/show/123 because I want to test if a user can access a product by directly inserting a link into address bar.

Please help, I don't have any more ideas.
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Geb testing