Jenkins 如何在无头Linux上运行appium

Jenkins 如何在无头Linux上运行appium,jenkins,selenium-webdriver,headless,appium,xvfb,Jenkins,Selenium Webdriver,Headless,Appium,Xvfb,我如何以headless方式运行测试(对于web测试,我使用XVFB在Jenkins上以headless方式运行浏览器测试),那么它将如何在AVD/Device上实现自动化呢 我正试图在Centos 6 headless linux上使用appium运行移动web测试,但我一直遇到以下错误: "info: [CHROMEDRIVER STDERR] No protocol specified info: Responding to client with error: {"status":13

我如何以headless方式运行测试(对于web测试,我使用XVFB在Jenkins上以headless方式运行浏览器测试),那么它将如何在AVD/Device上实现自动化呢

我正试图在Centos 6 headless linux上使用appium运行移动web测试,但我一直遇到以下错误:

"info: [CHROMEDRIVER STDERR] No protocol specified

info: Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error      
occurred while processing the command.","origValue":"**unknown error: an X display is required for    
keycode onversions, consider using Xvfb\n**  (Session info: chrome=webview)\n  
(Driver info:chromedriver=2.9.248316,platform=Linux 2.6.32042stab088.4x86_64)"}, 
"sessionId":"8563fbe5972f3ba87673c7a082d49d22"}POST /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22/element/0.06753459526225924-1/value 500 1927ms - 395b

debug: Appium request initiated at /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22

debug: Request received with params: {}

info: Shutting down appium session..."

它打开chrome浏览器并导航到给定的url。之后,它尝试将密钥发送到用户名字段,但失败。

我们刚刚遇到了这个问题,并通过将appium服务器调用包装到对xvfb的调用中解决了这个问题:

xvfb-run appium --session-override --command-timeout=0 &
(或任何您需要的appium服务器设置)

然后,xvfb run将为您处理无头服务器设置和关闭