在 Jenkins 中运行 Selenium 测试 [英] Running Selenium tests in Jenkins
本文介绍了在 Jenkins 中运行 Selenium 测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用 Selenium IDE 记录了一些简单的 selenium 测试.现在我想在 Jenkins 中运行这些测试.我需要 Jenkins 的哪个插件来做到这一点?以及如何逐步运行测试?感谢您的帮助.
I have recorded some simple selenium tests by Selenium IDE. Now I want to run those tests in Jenkins. Which plugin to Jenkins do I need to do that? And how to run the tests step by step? Help is appreciated.
推荐答案
您可以使用录制的 selenium IDE 脚本和 selenium-server.jar 文件从 Jenkins 运行它步骤如下:
you can use recorded selenium IDE script and selenium-server.jar file to run it from Jenkins Here is steps:
- 前往 SeleniumHQ 页面并下载 Selenium Server 文件例如:selenium-server-standalone-2.33.0.jar
- 修复 html 测试套件 使用 Selenium IDE 记录然后另存为html 测试用例和测试套件然后将它们放在同一个文件夹中例如:TestCase.html、TestSuite.html
- 在詹金斯
- 插件 Seleniumhq
- 配置 Selenium 运行器文件管理 Jenkins > 配置系统 > Selenium 远程控制:htmlSuite Runner = 您在步骤 1 中下载的文件的路径
- 配置要运行的作业在构建字段中单击添加构建步骤",然后选择seleniumhq htmlSuite Run"浏览器:*firefox 或 *iexploer ....startURL:http://www.google.com 或 ...suiteFile:输入步骤 2 中保存的 TestSuite.html 文件的绝对路径resultFile:输入将保存结果的文件的绝对路径
- Go to SeleniumHQ page and download Selenium Server file Eg: selenium-server-standalone-2.33.0.jar
- Repair html test suite Use Selenium IDE to record then save as html test case and test suite then put them in a same folder eg: TestCase.html, TestSuite.html
- In jenkins
- Plugin Seleniumhq
- Configure Selenium runner file Manage Jenkins > Configure System > Selenium Remote Control: htmlSuite Runner = path to file u have download in step 1
- Configure Job to run In Build field click " Add build step" then select "seleniumhq htmlSuite Run" browser: *firefox or *iexploer .... startURL: http://www.google.com or ... suiteFile: Input absolutely path to TestSuite.html file saved in step 2 resultFile: Input absolutely path to a file that results will be saved
希望对您有所帮助!
这篇关于在 Jenkins 中运行 Selenium 测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文