[Not maintained] Testbot is a test distribution tool that works with Rails, RSpec, RSpec2, Test::Uni...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
This is not maintained by me anymore. If you want to take over as maintainer for the project, please let me know.
Testbot has helped me ship well tested software for 7+ years, but it hasn't been well maintained for quite a while and I don't use it myself anymore.
I recommend looking at a CI service like CircleCI for parallel tests and Knapsack Pro for test balancing. I've seen the same performance of 10 CircleCI containers with Knapsack Pro balancing compared to 16 CPU cores with testbot. It's a bit more expensive to run, but it's easier to maintain.
Testbot is a test distribution tool that works with Rails, RSpec, RSpec2, Test::Unit and Cucumber. The basic idea is that you let testbot spread the load of running your tests across multiple machines to make the tests run faster.
Using testbot on 11 machines (25 cores) we got our test suite down to 2 minutes from 30. More examples of how testbot is used.
If you intend to use testbot with cloud computing (like EC2), take a look at TestbotCloud.
gem install testbot
testbot --server testbot --runner --connect localhost sleep 5 # wait for the runner to register with the server
mkdir -p testbotdemo/test; cd testbotdemo echo 'require "test/unit"' > test/demo_test.rb echo 'class DemoTest < Test::Unit::TestCase; def test_first; end; end' >> test/demo_test.rb
testbot --test --connect localhost
testbot --server stop testbot --runner stop cd ..; rm -rf testbotdemo rm -rf /tmp/testbot
The project files from the demo project are synced to /tmp/testbot/$USER (default). The runner syncs the files to /tmp/testbot/project (default). The tests are then run and the results returned through the server and displayed.
Requester -- (files to run) --> Server -- (files to run) --> (many-)Runner(s) ^ | ^ | |---------------------------| |----------------------------------| (results) (results)
Here I make the assumption that you have a user called testbot on a server at 192.168.0.100 that every computer can log into without a password and that you have installed testbot on each computer.
ssh [email protected] testbot --server
On every computer that should share CPU resources run:
testbot --runner --connect 192.168.0.100
testbot --test --connect 192.168.0.100 # --test could also be --spec (RSpec), --rspec (RSpec 2) or --features
Using testbot with Rails 2:
# Add testbot to your Gemfile if you use bundler. You also need the plugin because # Rails 2 does not load raketasks from gems. ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.7.8' script/generate testbot --connect 192.168.0.100
rake testbot:spec (or :rspec, :test, :features)
Using testbot with Rails 3:
rails g testbot --connect 192.168.0.100 rake testbot:spec (or :rspec, :test, :features)
You can keep track of the testbots on:
To simplify updates there is a --auto_update option for the runner. The runner processes that use this option will be automatically updated and restarted when you change the server version.
This requires testbot to be installed without sudo as the update simply runs "gem install testbot -v new_version". I recommend using RVM (it handles paths correctly).
Example: testbot --runner --connect 192.168.0.100 --auto_update
testbot (or testbot --help)
If there is anything missing or unclear you can create an issue (or send me a pull request).
First, get the tests to run:
For development I recommend using guard.
# OSX needs: gem install rb-fsevent guard
Make your change (don't forget to write tests) and send me a pull request.
You can also contribute by adding to the wiki.
Add a lib/shared/adapters/frameworknameadapter.rb file and update this readme.