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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
you can use recorded selenium IDE script and selenium-server.jar file to run it from Jenkins Here is steps:
- 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
Hope this help!
回答2:
I did the same but the following error occurred: Unable to find the HTML runner. This is normally because you have not downloaded or made available the 'selenium-leg-rc' jar on the CLASSPATH. Your test will not be run. Download the Selenium HTML Runner from http://www.seleniumhq.org/download/ and use that in place of the selenium-server-standalone.jar for the simplest way of running your HTML suite.