Jenkins 的 Selenium/Xvfb 問題

Jenkins 的 Selenium/Xvfb 問題

我正在努力讓 Jenkins 運行 Selenium/Xvfb 來對專案進行一些功能測試。詹金斯要么會掛起,工作永遠不會完成,要么最終因錯誤而終止。這是使用 Xvfb 插件。這是最新的回溯之一——

======================================================================
ERROR: test_update_yeast_invalid_form_validation (functional_tests.test_simple_yeast_validation_form.YeastFormValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/MyProj/functional_tests/base.py", line 29, in setUp
    self.browser = webdriver.Firefox()
  File "/var/lib/jenkins/shiningpanda/jobs/d4d78946/virtualenvs/d41d8cd9/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 158, in __init__
    keep_alive=True)
  File "/var/lib/jenkins/shiningpanda/jobs/d4d78946/virtualenvs/d41d8cd9/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/var/lib/jenkins/shiningpanda/jobs/d4d78946/virtualenvs/d41d8cd9/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/var/lib/jenkins/shiningpanda/jobs/d4d78946/virtualenvs/d41d8cd9/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute
    self.error_handler.check_response(response)
  File "/var/lib/jenkins/shiningpanda/jobs/d4d78946/virtualenvs/d41d8cd9/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1


----------------------------------------------------------------------
Ran 25 tests in 33.513s

FAILED (errors=19, skipped=6)
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
Destroying test database for alias 'default'...
Build step 'Virtualenv Builder' marked build as failure
Xvfb stopping
unlink: No such file or directory
unlink /var/lib/jenkins/xvfb-30-..fbdir854052494809466199/Xvfb_screen0 failed, Invalid argumentFinished: FAILURE

這可能與即使我終止作業 Xvfb 仍在運行的問題有關。這是我的設定:

在建置之前啟動 Xvfb,然後在 = 選取 Xvfb 特定顯示名稱 = 99 逾時(秒)後關閉它 = 10 Xvfb 顯示名稱偏移 = 0 記錄 Xvfb 輸出 = 選中

我嘗試使用注入環境變數插件來新增以下環境變數 - DISPLAY=:99.0

我嘗試搜尋日誌,但無法在 Google 上找到任何有關日誌位置的資訊。有人能幫我指出正確的方向嗎?

相關內容