Readme.md in parallel_tests-0.7.2 vs Readme.md in parallel_tests-0.7.3

- old
+ new

@@ -5,11 +5,11 @@ Setup for Rails =============== [still using Rails 2?](https://github.com/grosser/parallel_tests/blob/master/ReadmeRails2.md) -## Install +### Install If you use RSpec: ensure you got >= 2.4 As gem # add to Gemfile @@ -20,25 +20,23 @@ rails plugin install git://github.com/grosser/parallel_tests.git # add to Gemfile gem "parallel", :group => :development -## Setup +### Add to `config/database.yml` ParallelTests uses 1 database per test-process, 2 processes will use `*_test` and `*_test2`. - -### 1: Add to `config/database.yml` test: database: yourproject_test<%= ENV['TEST_ENV_NUMBER'] %> -### 2: Create additional database(s) +### Create additional database(s) rake parallel:create -### 3: Copy development schema (repeat after migrations) +### Copy development schema (repeat after migrations) rake parallel:prepare -### 4: Run! +### Run! rake parallel:test # Test::Unit rake parallel:spec # RSpec rake parallel:features # Cucumber rake parallel:test[1] --> force 1 CPU --> 86 seconds @@ -51,12 +49,12 @@ rake parallel:test[^test/unit] # every test file in test/unit folder rake parallel:test[user] # run users_controller + user_helper + user tests rake parallel:test['user|product'] # run user and product related tests -Example output --------------- +### Example output + 2 processes for 210 specs, ~ 105 specs per process ... test output ... 843 examples, 0 failures, 1 pending @@ -70,47 +68,44 @@ Log test runtime to give each process the same runtime. Rspec: Add to your `.rspec_parallel` (or `.rspec`) : - RSpec - If installed as plugin: -I vendor/plugins/parallel_tests/lib - --format progress - --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log + If installed as plugin: -I vendor/plugins/parallel_tests/lib + --format progress + --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log Test::Unit: Add to your `test_helper.rb`: require 'parallel_tests/test/runtime_logger' -SpecSummaryLogger +RSpec: SummaryLogger -------------------- This logger logs the test output without the different processes overwriting each other. Add the following to your `.rspec_parallel` (or `.rspec`) : - RSpec: - If installed as plugin: -I vendor/plugins/parallel_tests/lib - --format progress - --format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log + If installed as plugin: -I vendor/plugins/parallel_tests/lib + --format progress + --format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log -SpecFailuresLogger +RSpec: FailuresLogger ----------------------- This logger produces pasteable command-line snippets for each failed example. E.g. rspec /path/to/my_spec.rb:123 # should do something Add the following to your `.rspec_parallel` (or `.rspec`) : - RSpec: - If installed as plugin: -I vendor/plugins/parallel_tests/lib - --format progress - --format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log + If installed as plugin: -I vendor/plugins/parallel_tests/lib + --format progress + --format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log Setup for non-rails =================== gem install parallel_tests # go to your project dir @@ -154,21 +149,22 @@ TIPS ==== - [Capybara + Selenium] add to env.rb: `Capybara.server_port = 8888 + ENV['TEST_ENV_NUMBER'].to_i` - [RSpec] add a `.rspec_parallel` to use different options, e.g. **no --drb** - [RSpec] delete `script/spec` - - [RSpec] [spork](https://github.com/timcharper/spork) does not work in parallel + - [RSpec] [spork](https://github.com/sporkrb/spork) does not work in parallel - [RSpec] remove --loadby from you spec/*.opts - [RSpec] Instantly see failures (instead of just a red F) with [rspec-instafail](https://github.com/grosser/rspec-instafail) - [Bundler] if you have a `Gemfile` then `bundle exec` will be used to run tests - [Capybara setup](https://github.com/grosser/parallel_tests/wiki) - [Sphinx setup](https://github.com/grosser/parallel_tests/wiki) - [Capistrano setup](https://github.com/grosser/parallel_tests/wiki/Remotely-with-capistrano) let your tests run on a big box instead of your laptop - [SQL schema format] use :ruby schema format to get faster parallel:prepare` - [ActiveRecord] if you do not have `db:abort_if_pending_migrations` add this to your Rakefile: `task('db:abort_if_pending_migrations'){}` - `export PARALLEL_TEST_PROCESSORS=X` in your environment and parallel_tests will use this number of processors by default - [ZSH] use quotes to use rake arguments `rake "parallel:prepare[3]"` + - [email_spec and/or action_mailer_cache_delivery](https://github.com/grosser/parallel_tests/wiki) TODO ==== - add unit tests for cucumber runtime formatter - make jRuby compatible [basics](http://yehudakatz.com/2009/07/01/new-rails-isolation-testing/) @@ -205,9 +201,10 @@ - [Lawrence Wang](https://github.com/levity) - [Sean Walbran](https://github.com/seanwalbran) - [Lawrence Wang](https://github.com/levity) - [Potapov Sergey](https://github.com/greyblake) - [Łukasz Tackowiak](https://github.com/lukasztackowiak) + - [Pedro Carriço](https://github.com/pedrocarrico) [Michael Grosser](http://grosser.it)<br/> michael@grosser.it<br/> License: MIT