运行黄瓜后
bundle exec cucumber features/emails.feature:20
我收到了错误
Display socket is taken but lock file is missing – check the Headless
troubleshooting guide (Headless::Exception)
/Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:195:in
ensure_xvfb_is_running'
launch_xvfb’
/Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:184:in
/Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:172:in
`block in pick_available_display’
我正在运行MacOS 10.11.5,xquartz安装,第一次测试开始,我不能让它重新开始.有什么建议?
解决方法
完全披露:我不知道这里发生了什么,并希望有人向我解释,但运行以下命令可以使Xvfb和我的测试套件正常工作:
mkdir /tmp/.X11-unix sudo chmod 1777 /tmp/.X11-unix sudo chown root /tmp/.X11-unix/
我在这里找到了这个答案:
https://github.com/leonid-shevtsov/headless/issues/47(第一条评论)