Fork me on GitHub

29 Dec 2009

Selenium RC tests with a remote app

I've just released a new snapshot of the Selenium RC plugin. The main new feature is the ability to run your Selenium tests against a running instance of your application instead of having the application start and stop as part of the test phase. A number of people have requested this. It's really useful for CI environments where you may want to start the app up on a different server from where the tests are being run.

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.

8 comments:

Robert Elliot said...

This is fantastic - looking forward to using it.

franklin said...

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,

Rob said...

-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.

agario games said...

Interesting article! Thank you for sharing them! I hope you will continue to have similar posts to share with everyone! I believe a lot of people will be surprised to read this article!
slither io

aliamay said...

Watch champion trophy 2017 live streaming CT 2017 of all the matches live scorecard Ball by ball commentary of all the matches.
Match prediction CT 2017.
Astrology prdiction CT 2017
TV channels broadcast CT 2017

bloxorz said...

I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again
slither io

Quba Khan said...

Here we go with the Latest Govt jobs 2017 -2018 ( 3,18,200 Sarkari Naukri jobs openings. Government Jobs 2017-18: Get notification of all Government Jobs, Sarkari Naukri recruitment, bank jobs, State Govt jobs including SSSB, SSC, PSC, UPSC etc. Latest 10th 12th Pass Govt Jobs 2017 – 2018(62000 Sarkari) records.
Lest talk the latest 10th 12th Pass Govt Jobs 2017 – 2018(62000 Sarkari Vacancies Opening .... Latest Govt jobs 2017 -2018 ( 3,18,200 Sarkari Naukri jobs openings ). Sarkari Naukri 2017, सरकारी नौकरी, Government Jobs. Sarkari Naukri provide employment news of sarkari naukri 2017 for government jobs. Sarkari Naukri update latest job news for govt sector companies - 2017. Sarkari Naukri: Latest Govt Jobs, Sarkari Job, सरकारी ... - Amar Ujala Translate this pageबुधवार, 22 नवंबर 2017; +. सतीश धवन स्पेस सेंटर में टेक्नीशियन/ ड्राफ्ट्समैन के पद पर वैकेंसी • पॉलीटेक्निक के 89 स्टूडेंट्स. Sarkari Naukri in India 2017 | सरकारी नौकरी भारत में
Looking to get Sarkari Naukri? Check सरकारी नौकरी in India. Latest updates on 10000+ vacancies opportunity. You can apply online or offline. Upcoming Government Jobs 2018 ( 2,77000 Sarkari Naukri Opening). Jump to Jharkhand Staff Selection Commission recruitment 2017 - HP Police Recruitment 2017 – 1073 ... Govt Jobs (Sarkari Naukri 2018). Sarkari Naukri in Rajasthan Govt Jobs in Rajasthan Vacancy 2017. Latest Government Jobs in Rajasthan 2017 For Sarkari Naukri in Rajasthan and Current Vacancy in Jaipur, Udaipur, Jodhpur, Bikaner. Sarkari Naukri 2018 सरकारी नौकरी Sarkari Jobs Naukari. Sarkari Naukri Daily is Top Sarkari Job Portal and sarkari naukri 2017 for Banking, Railway Naukari, Public Sector, Research Sarkari Naukri 2018 in India. ... Top Current Affairs For Sarkari Naukri Preparation 22 November 2017 • Latest Government Jobs 2018-2019 | THE SARKARI NAUKRI. Oct 18, 2016 - We have listed here the latest Sarkari Naukri / Government Jobs with Number ... BPSC, Assistant Engineer, 1345 posts, 06.12.2017, Click Here. Police Jobs 2018 | THE SARKARI NAUKRI. Chhattisgarh Police Recruitment 2017 – 2976 posts of Constable (GD) and ... Here we have listed Jobs / Sarkari Naukri in Police Department of various Indian

Love Kpop said...

It seems I'm on the right track, I hope I can do well. The result was something I did and was doing to implement it.
www.clickjogosclick.com