public
Rubygem
Description: a big hairy fuzzy spider that crawls your site, wreaking havoc
Homepage: http://opensource.thinkrelevance.com/wiki/tarantula
Clone URL: git://github.com/relevance/tarantula.git
Search Repo:
name age message
folder .gitignore Thu May 29 14:59:04 -0700 2008 Added tmp and rcov_tmp to gitignore. [spicycode]
folder MIT-LICENSE Mon Feb 04 10:20:09 -0800 2008 initial tarantula [stu]
folder README Wed Jul 02 00:39:26 -0700 2008 link to trac [rsanheim]
folder Rakefile Thu May 29 14:59:04 -0700 2008 Added tmp and rcov_tmp to gitignore. [spicycode]
folder init.rb Mon Feb 04 10:20:09 -0800 2008 initial tarantula [stu]
folder install.rb Mon Feb 04 10:20:09 -0800 2008 initial tarantula [stu]
folder laf/ Mon Apr 07 06:46:20 -0700 2008 partial implementation of EY's new look-and-feel [stu]
folder lib/ Tue Jul 08 19:52:34 -0700 2008 fixing <link> tag with missing node text ... [Jason]
folder tasks/ Sat Jun 07 09:16:49 -0700 2008 adding in linux support for tarantula:test [abedra]
folder template/ Mon Jul 14 12:46:07 -0700 2008 updating test template to reflect new password ... [abedra]
folder test/ Tue Jul 08 19:52:34 -0700 2008 fixing <link> tag with missing node text ... [Jason]
folder uninstall.rb Mon Feb 04 10:20:09 -0800 2008 initial tarantula [stu]
folder vendor/ Thu Feb 28 08:37:09 -0800 2008 turn off parts of xss_shield that are blowing u... [stu]
README
== tarantula ==

== Description ==

Tarantula is a big fuzzy spider. It crawls your Rails application, fuzzing data to see what breaks.

== Install ==

{{{
#!sh
script/plugin install git://github.com/relevance/tarantula.git tarantula
}}}

== Dependencies ==

{{{
gem install htmlentities
gem install facets
}}}

== Usage ==

Create a Rails integration test that looks like this, filling in your own auth params. You will probably want to include 
all fixtures.

{{{
# somewhere
require 'relevance/tarantula'

# in your test
def test_with_login
  post '/sessions/create', :password => 'your-pass'
  assert_response :redirect
  assert_redirected_to '/'
  follow_redirect!
  tarantula_crawl(self)
end
}}}

If you want to set custom options, you can get access to the crawler and set properties before running it. For example, 
this would turn on HTMLTidy.

{{{
def test_with_login
  post '/sessions/create', :password => 'your-pass'
  assert_response :redirect
  assert_redirected_to '/'
  follow_redirect!
  t = tarantula_crawler(self)
  t.handlers << Relevance::Tarantula::TidyHandler.new
  t.crawl '/'
end
}}}

Assuming your project is at /work/project/:

{{{
#!sh
cd /work/project
rake tarantula:test
}}}

== Verbose Mode ==

If you run the test you will get a report in tmp/tarantula. You can also set VERBOSE=true to see more detail as the test 
runs.

For more options see the test suite.

== Allowed Errors ==

If, for example, a 404 is an appropriate response for some URLs, you can
tell Tarantula to allow 404s for URLs matching a regexp:

{{{
t = tarantula_crawler(self)
t.allow_404_for %r{/users/\d+/}
}}}


== Bugs/Requests ==

Please submit your bug reports, patches or feature requests as a ticket under the component "tarantula" on our Trac 
instance here: http://opensource.thinkrelevance.com/.  You'll have to create an account (Sorry!  Otherwise we'd get way 
too much spam).

== License and Copyright ==

Copyright (c) 2008 Relevance, Inc., released under the MIT license