您的位置:首页 > 其它

How to run selenium 2.0 script in jenkins

2014-08-16 08:02 274 查看
http://stackoverflow.com/questions/17191406/how-to-run-selenium-2-0-script-in-jenkins

I have selenium webdriver script, and i want to run the script in jenkins. how to configure in jenkins. what steps i need to fallow?
i am new to jenkins, can any one tell me the step by step procedure to fallow.

Response:

If you're running Jenkins on a unix machine, create a new job: Click on New Job, Type a name and click on Build a free-style software project

Then add a 'build' step called 'Execute shell'. (For windows you can use Windows Batch command).

Using that you can run the selenium standalone server jar to execute the your selenium script.

For example: java -version && java -jar /Applications/SeleniumRC/selenium-server-standalone-2.12.0.jar -trustAllSSLCertificates -htmlSuite "*googlechrome" "https://user:password@www.example.com/"
"examplesuite.html" "result_file.html"

Other option would be to go to Configure Jenkins -> Configure Plugins and install Hudson Seleniumhq plugin and use the build step provided by them when configuring the jenkins job.

You might also want to create a Post-build Action to show reports. If you install Selenium HTML report plugin from the aforementioned Manage Plugins page, you can then add 'Publish selenium report' Post-build step.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: