これは私のオンラインでの最初の質問です。コメントしてください。質問を更新して明確にします。
私はWeb開発にまったく慣れておらず、現在、会社のプロジェクトのテストスイートに取り組んでいます。javascriptを含む関数の統合テストを行おうとしているところまではうまく機能していました。webkit(gitからバンドル)とセレンの両方を使ってみました。Webkitは次のエラーメッセージを出しました。
Wrote response false "Unable to load URL: http://127.0.0.1:56618/ because of error loading http://127.0.0.1:56618/: Connection closed"
Cleaning database...done
Received "Reset"
Started "Reset"
Finished "Reset"
Wrote response true ""
should see invalid message (FAILED - 1)
Failures:
1) Users GET /sign_in with invalid account should see invalid message
Failure/Error: visit root_path
Capybara::Webkit::InvalidResponseError:
Unable to load URL: http://127.0.0.1:56618/ because of error loading http://127.0.0.1:56618/: Connection closed
そして、Seleniumを使用するとき、FireFoxは次のことについて不平を言います。
Your Firefox profile cannot be loaded. It may be missing or inaccessible.
何が問題なのか、誰か手がかりがありますか?前もって感謝します!
私のsepc_helper.rb
Spork.prefork do
...
..
.
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.before(:suite) { require "#{Rails.root}/db/seeds.rb" }
config.before(:each) do
if Capybara.current_driver == :rack_test
DatabaseCleaner.strategy = :transaction
else
DatabaseCleaner.strategy = :truncation
end
DatabaseCleaner.start
end
config.after(:each) do
if Capybara.current_driver == :rack_test
DatabaseCleaner.clean
else
DatabaseCleaner.clean
load "#{Rails.root}/db/seeds.rb"
end
end
end
end
Spork.each_run do
ActiveRecord::Schema.verbose = false
load "#{Rails.root.to_s}/db/schema.rb"
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
end