我使用Capybara / Rspec执行某些功能测试,我使用了Capybara使用的默认rack_test驱动程序,但是,我似乎无法使用此工具使webkit驱动程序正常工作指南:https://mattbrictson.com/running-capybara-webkit-specs-with-jenkins-ci
我使用的命令如下:
DISPLAY=localhost:1.0 xvfb-run rspec spec/features/sample_spec.rb
我得到的结果是:
Failure/Error: visit '/'
Timeout::Error:
execution expired
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:107:in `initialize'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:107:in `open'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:107:in `attempt_connect'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:101:in `block in connect'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:99:in `connect'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/connection.rb:26:in `initialize'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/driver.rb:17:in `new'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit/driver.rb:17:in `initialize'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit.rb:11:in `new'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.5.1/lib/capybara/webkit.rb:11:in `block in <top (required)>'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara/session.rb:79:in `call'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara/session.rb:79:in `driver'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara/session.rb:65:in `initialize'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara.rb:248:in `new'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara.rb:248:in `current_session'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara/dsl.rb:46:in `page'
# /usr/local/rvm/gems/ruby-2.1.0/gems/capybara-2.4.4/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
# ./spec/features/sample_spec.rb:52:in `block (3 levels) in <top (required)>'
我的visit '/'
代码与rack_test完美配合......与webkit的交易是什么?