문제

We have some webdriver/testng/maven/java tests that we need to run automatically after each deploy, but its been 4 days and I just cant get the damn thing to work headlessly using xvfb. And I do not have access to the server, and to Jenkins configuration, other to constantly bugging the poor guy who operates these.

So what kind of a workaround would you offer in this case? Can Jenkins do jobs on remote servers (say I find a server that doesnt need to run tests headlessly)? Or is there an alternative to xvfb?

도움이 되었습니까?

해결책

Setup your selenium tests to use remote webdriver

For info read here - http://code.google.com/p/selenium/wiki/RemoteWebDriver and http://docs.seleniumhq.org/docs/03_webdriver.jsp#selenium-webdriver-s-drivers

UPDATE

Jeeny - "Can Jenkins do jobs on remote servers (say I find a server that doesnt need to run tests headlessly)?"

Amey - "Yes"

BUT instead of running the Jenkins job on a remote server, make your selenium tests run on a remote server.

I assume you initialize your selenium webdriver browser instance by this command

WebDriver driver = new FirefoxDriver();

change that to

driver = webdriver.Remote("http://your.remote.server:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top