我在通过 Jenkins 运行黄瓜测试时遇到了以下消息。
请从下面查看控制台消息。以前,我能够成功运行该作业,但无法从第二次运行。
+ cd bin
+ make
rm -f override.so
gcc -Wall -O2 -fpic -shared -ldl -o override.so override.c
+ cd ..
<cucumber command>
Could not find an available display (Headless::Exception)
/var/lib/gems/1.9.1/gems/headless-1.0.1/lib/headless.rb:141:in `pick_available_display'
/var/lib/gems/1.9.1/gems/headless-1.0.1/lib/headless.rb:128:in `attach_xvfb'
/var/lib/gems/1.9.1/gems/headless-1.0.1/lib/headless.rb:78:in `initialize'
/var/lib/jenkins/workspace/Zalora_MY/features/support/env.rb:40:in `new'
/var/lib/jenkins/workspace/Zalora_MY/features/support/env.rb:40:in `<top (required)>'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/rb_support/rb_language.rb:137:in `load'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime/support_code.rb:82:in `each'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime.rb:182:in `load_step_definitions'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/runtime.rb:41:in `run!'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/cli/main.rb:43:in `execute!'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/lib/cucumber/cli/main.rb:20:in `execute'
/var/lib/gems/1.9.1/gems/cucumber-1.2.5/bin/cucumber:14:in `<top (required)>'
/usr/local/bin/cucumber:23:in `load'
/usr/local/bin/cucumber:23:in `<main>'
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
我无法在黄瓜中解决这个异常问题。请帮忙。