Run Selenium Test Automatically Every 5 minutes
Is there a way to automate a selenium test to run every five 开发者_Go百科minutes?
If you've got your tests packed as an executable the easiest way may be to run a CRON job or a Windows scheduled task.
That said, Hudson (or another continuous integration system) are almost certainly better long term strategies.
+1 to Hudson, but you might also want to check out my startup, BrowserMob. We provided free and commercial services that let you run Selenium scripts from multiple locations around the world and be alerted if there are problems.
You could do that with Hudson CI (see this article), or do the same manually (in a cron or Windows scheduler), by using the Selenium RC from command-line:
java -jar /usr/local/bin/selenium-server.jar -htmlSuite "*firefox" http://example.com/ my_test_suite.html build/logs/seleniumhq.html
+1 Hudson, it has a very good support for Selenium Tests, there are some commercial tools as well like Cruise Control, Anthill Pro.
Otherwise you can use the Cron jobs or windows schedular.
If you are using RC, write an Ant script and then schedule it as mentioned in the other posts.
精彩评论