0

こんにちは、ローカルマシンでgalenフレームワークを使用してテストを実行していますが、正常に実行されますが、jenkinsで実行すると次のエラーが発生します:

> galen test ./test/test-e2e/ui_galen/tests/HomePage.test.js --htmlreport reports -Dwebdriver.chrome.driver=./test/test-e2e/bin/drivers/linux/chromedriver

========================================
Test: valida la home page de identity validation on desktop emulation en 1024 device
========================================
Jan 23, 2018 11:16:35 AM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 32254
Only local connections are allowed.
org.mozilla.javascript.WrappedException: Wrapped org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-1022-aws x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.06 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: '82965b46ff8c', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1022-aws', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver (<cmd>#37)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
    at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
    at org.mozilla.javascript.gen._cmd__18._c_createDriver_2(<cmd>:37)
    at org.mozilla.javascript.gen._cmd__18.call(<cmd>)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
    at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_devices_js_25._c_anonymous_16(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/devices.js:116)
    at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_devices_js_25.call(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/devices.js)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
    at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_galen_config_js_23._c_openDriverForDevice_6(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/galen_config.js:58)

    at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally

ジェンキンスにXvfbをインストールしました。Galen がジェンキンスで実行するための追加の構成はありますか?

これが私が持っているXvfb構成です:

echo $'\nInitializing X virtual framebuffer (Jenkins only) ...'
export DISPLAY=:0
Xvfb :0 -screen 0 1024x768x8 &> /dev/null &

その後、npm run e2e-galen:ci コマンドを実行します。

4

1 に答える 1

0

Galen コマンドを実行する前に Xvfb を開始しましたか?

例えば Xvfb :99 & export DISPLAY=:99

于 2018-01-25T03:21:35.067 に答える