All you need to do is set
selenium.remote = true in your SeleniumConfig.groovy and set selenium.url to the root URL of the server where the app is running. Once this is done you can run tests as normal (note: when remote mode is used Selenium tests run in the other phase rather than the functional phase).The really useful thing is that SeleniumConfig.groovy can contain environment blocks just as other Grails config files can. This means you can enable remote mode in your CI environment but continue to test as normal locally. For example:
selenium {
remote = false
// etc.
}
environments {
hudson {
selenium.remote = true
selenium.url = "http://my.test.server/"
}
}
The plugin release is a snapshot so you need to specify the version explictly:
grails install-plugin selenium-rc 0.2-SNAPSHOT and you need to be using Grails 1.2.
3 comments:
This is fantastic - looking forward to using it.
Hi Rob,
what command should I execute to run your sample?
I am trying this without success:
grails test-app production -other
And also:
grails test-app production -functional
My production environment is similar to what you have in your hudson environment.
Thanks,
-other should do it. Can you give any more detail about the problem you are seeing?
By the way, in 1.0 final I will be making remote tests run in the functional phase as I have found a way to prevent it from running the app. I think this will be less confusing for everyone.
Post a Comment