dongtangxi1584
dongtangxi1584
2015-09-21 16:03

在jenkins构建步骤启动selenium-server

  • jenkins
  • php
  • codeception

Desired result

  1. Start selenium server
  2. Run tests
  3. Stop selenium server

What i've tried

java -jar tests/selenium-server.jar -Dwebdriver.chrome.driver=chromedrive

The build gets stuck on this step

java -jar tests/selenium-server.jar -Dwebdriver.chrome.driver=chromedrive &

OR

nohup java -jar tests/selenium-server.jar -Dwebdriver.chrome.driver=chromedrive > log.txt &

It passes the start server step, but my test can't run because it cant connect to selenium server

** Update 1 ** It seems to be a issue with my VPS. Even through ssh, the selenium server doesn't starts.

root@PIV:/usr/share/nginx/pivdev/tests# java -jar selenium-server.jar

Output:

21:53:08.857 INFO - Launching a standalone Selenium Server
21:53:08.911 INFO - Java: Oracle Corporation 24.79-b02
21:53:08.914 INFO - OS: Linux 3.13.0-52-generic amd64
21:53:08.945 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314
21:53:09.070 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match the current platform LINUX
21:53:09.071 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, browserName=MicrosoftEdge, version=}] does not match the current platform LINUX
21:53:09.071 INFO - Driver class not found: com.opera.core.systems.OperaDriver
21:53:09.071 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐