Skip to content

Instantly share code, notes, and snippets.

@dbrady
Created May 4, 2011 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbrady/956096 to your computer and use it in GitHub Desktop.
Save dbrady/956096 to your computer and use it in GitHub Desktop.
tourbus in 3 steps
# Crush your website in 3 easy steps with TourBus!
# 1. get tourbus. Latest isn't in rubygems yet.
# If you don't have bundler, make sure you have the reqs.
git clone https://github.com/dbrady/tourbus.git &&
cd tourbus &&
bundle install &&
gem build tourbus.gemspec &&
gem install tourbus-2.0.0.gem
# 2. write a simple tour to touch your website
cd $your_project_dir
mkdir tours && cd tours
echo 'class Sample < Tourist
def tour_zed
visit "http://zedshaw.com:6767/tests/sample.html"
assert_contain "hi there"
end
end' > sample.rb
cd ..
tourbus
# should run 1 tourist 1 time through that page
# 3. drop a train on em, Edgar. 100 tourists each doing 10 laps
tourbus -n 10 -c 100
@dbrady
Copy link
Author

dbrady commented May 4, 2011

For best results use JRuby, which has real threads.

@dbrady
Copy link
Author

dbrady commented May 4, 2011

For the most painless gem setup, get rvm and then do this first:

rvm install jruby
rvm use jruby
rvm gemset create tourbus
rvm gemset use tourbus
cd tourbus
gem install bundler
bundle install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment