How to integrate jenkins with selenium?

In my work location, we are creating automated web application tests using selenium web driver. Now we want to integrate it with Jenkins continuous integration tool to run the tests automatically when a new build is pushed to the server. How to do this implementation?


  • Create a Maven pom.xml file in a new project directory that includes all the dependencies you need to get the project going.

  • From the command-line, run mvn clean install to download the dependencies.

  • Install PhantomJS from phantomjs.org/download.html . Make sure phantomjs is accessible from the command line.

  • If you have not done so yet, create a test.

  • Run the test. At the prompt, type: mvn test The test will run using PhantomJS and output the results to target/surefire-reports in a JUnit XML format that is understood by Jenkins.

  • Make sure PhantomJS is installed on all the Jenkins Nodes that will run the tests.

  • Create a new Jenkins job and set it to run after a build is deployed.

  • Save the job, run it and view the test results.

  • 链接地址: http://www.djcxy.com/p/50782.html

    上一篇: C#,WPF项目的自动化测试和持续集成

    下一篇: 如何整合jenkins与硒?