How to run selenium 2.0 script in jenkins

本文介绍如何在Jenkins中配置并运行Selenium WebDriver脚本。适用于Jenkins新手,提供逐步指南,包括创建自由风格项目、使用执行Shell命令步骤来启动Selenium独立服务器,以及安装和使用Hudson SeleniumHQ插件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值