Skip to content
xunker edited this page Feb 14, 2011 · 70 revisions

Getting stuff running

With sphinx -- by rgo

At file config/sphinx.yml in test or cucumber section: cucumber: port: <%= 9313 + ENV['TEST_ENV_NUMBER'].to_i %> searchd_file_path: <%= "#{RAILS_ROOT}/db/sphinx/sphinx.#{ENV['TEST_ENV_NUMBER'].to_i}" %> config_file: <%= "#{RAILS_ROOT}/config/cucumber.#{ENV['TEST_ENV_NUMBER'].to_i}.sphinx.conf" %> searchd_log_file: <%= "#{RAILS_ROOT}/log/searchd.#{ENV['TEST_ENV_NUMBER'].to_i}.log" %> query_log_file: <%= "#{RAILS_ROOT}/log/searchd.query.#{ENV['TEST_ENV_NUMBER'].to_i}.log" %> pid_file: <%= "#{RAILS_ROOT}/log/searchd.#{ENV['TEST_ENV_NUMBER'].to_i}.pid" %>

( I think searchd_log_file and query_log_file are not mandatory. )

With capybara(~>0.4.0)+selenium -- by rgo

Capybara.server_port = 9887 + ENV['TEST_ENV_NUMBER'].to_i

With capybara(=0.3.9)/Rails 2.3 -- by xunker

Add to features/support/env.rb:

if ENV['TEST_ENV_NUMBER'] class Capybara::Server def find_available_port @port = 9887 + ENV['TEST_ENV_NUMBER'].to_i @port += 1 while is_port_open?(@port) and not is_running_on_port?(@port) end end end

With ci_reporter -- by morganchristiansson

export CI_REPORTS=results

Add spec/parallel_specs.opts with the contents: --format progress --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec:/dev/null

Our project has the following in test/test_helper.rb if ENV["CI_REPORTS"] == "results" require "ci/reporter/rake/test_unit_loader" end

Run the tasks like this: rake "parallel:features[,,--format progress --format junit --out ${CI_REPORTS} --no-profile -r features]"

Or without rake like this: bundle exec $(bundle show parallel_tests)/bin/parallel_test --type features -o '--format progress --format junit --out ${CI_REPORTS} --no-profile -r features'

For more information on how to configure ci_reporter check under advanced usage on http://caldersphere.rubyforge.org/ci_reporter/

!! add your own experience / gotchas !!

( ͡° ͜ʖ ͡°) ¯_(ツ)_/¯!

Clone this wiki locally