Created
May 4, 2011 21:40
-
-
Save dbrady/956096 to your computer and use it in GitHub Desktop.
tourbus in 3 steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
For best results use JRuby, which has real threads.