简体   繁体   中英

Running Selenium tests in 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.

you can use recorded selenium IDE script and selenium-server.jar file to run it from Jenkins Here is steps:

  1. Go to SeleniumHQ page and download Selenium Server file Eg: selenium-server-standalone-2.33.0.jar
  2. 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
  3. 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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM