Ruby on Rails
Testing Plugins
Assert Required Plugin
- Keep your tests DRY with this custom Test::Unit assertion.
homepage: http://xmlblog.stikipad.com/plugins/show/assert_required
svn: http://www.xml-blog.com/svn/plugins/assert_required
Assert Valid Asset Plugin
- Enhanced version of Assert Valid Markup Plugin that also validates css files, has a better caching policy, can be configured to work behind a proxy and can be turned off via an environment variable.
homepage: http://www.realityforge.org/articles/2006/03/15/rails-plugin-to-validate-x-html-and-css
svn: http://www.realityforge.org/svn/code/assert-valid-asset/trunk/
svn: http://redgreenblu.com/svn/projects/assert_valid_markup/
Manage Fixtures
- Tasks to export your model data into fixtures. Then import them back. Differs from AR Fixtures by that it doesn’t use objects, but rather plain text files to go in and out of the database.
homepage: http://dev.toolbocks.com
svn: http://svn.toolbocks.com/plugins/manage_fixtures
svn: http://topfunky.net/svn/plugins/ar_fixtures
svn: http://www.eric-stewart.com/svn/rails/plugins/assert_accessible
MigrateTestDB Plugin
- MigrateTestDB plugin was created to allow migrations to be used to generate the test database in rake test commands. This is helpful for consistently testing migrations and is necessary when using VIEWS or STORED PROCEDURES as these are not replicated by either :ruby or :sql schema_formats.
homepage: http://elctech.com
svn: http://svn.elctech.com/svn/public/plugins/migrate_test_db
- ModelFactory is a Rails plugin that provides an easy way to create models for testing purposes.
git:
git://github.com/mhennemeyer/model_factory.git
- This plugin makes it easy to capture the $stderr and $stdout streams.
git:
git://github.com/mhennemeyer/output_catcher.git
- Tests for valid markup, unobtrusive Javascript, doctypes, content types, and much more!
svn: http://svn.codahale.com/responsible_markup/trunk
- Find your testsnd fragment caching logic: assert_cache_* and assert_expire_*
homepage: http://blog.cosinux.org/pages/page-cache-test
Selenium Testing
- Integrates Selenium testing into rails. Allows you to write Selenium tests in Ruby in the same way as functional and unit tests.
readme: http://svn.viney.net.nz/things/rails/plugins/selenium_testing/README
svn: http://svn.viney.net.nz/things/rails/plugins/selenium_testing
- This plugin enables overbdd. It provides the facility to write examples for the given-when-then steps in Rspec user stories.
git:
git://github.com/mhennemeyer/stepspecr.git
RSpec on Rails
- First attempt at integrating RSpec based
testing behaviour specification with Rails fixtures and controller testing behaviour specification.
svn: http://lachie.info/svn/projects/rails_plugins/rspec_on_rails/
ARTS Plugin – Another RJS Testing System
- Adds the “assert_rjs” method, allowing you to test all of your rjs interactions with the same syntax as rjs calls themselves (page.visual_effect …)
svn: http://thar.be/svn/projects/plugins/arts/
Testable Logger
- Testable Logger lets you assert that messages were (or were not) written to the application’s log file during a test case. It acts as a buffered proxy in front of the normal Logger object when running in a test environment. It will store the messages that are logged during a test run and make them available for testing through the assertions assert_logged and assert_nothing_logged.
home page & readme: http://code.teytek.com/rails/plugins/testable_logger/
bq. svn: http://svn.teytek.com/rails/plugins/testable_logger/trunk
Hpricot Forms
- HtmlUnit -ish way of testing web apps: pulling out a Form object from a visited page, setting its fields’ values and submitting it and getting back a Page, etc. Session, target url of form and links, existence of field names are all take care of. No assert_xxx methods added.
homepage & examples: http://blog.yanime.org/articles/2006/07/19/hpricotforms
svn: http://choonkeat.svnrepository.com/svn/rails-plugins/hpricot_forms/
- Automatically inject tests at runtime based on the associations defined in ActiveRecord models. Currently tests that fixtures are defined for each association and join table; that dependent records are destroyed, deleted or nullified; that acts_as_versioned is setup and functioning correctly; and a few others…
svn: http://www.infused.org/svn/plugins/test_injector
AbstractTestCases
- Allows you to suppress the “No tests were specified” failure for
abstract test cases. To define an abstract test case, simply use the
convenient “abstract_testcase” class method. See the README file for more details.
svn: http://wiseheartdesign.com/svn/plugins/abstract_testcases
TestHelpers
- Implements an easy pattern for using helper modules with tests. See the README file for more details.
svn: http://wiseheartdesign.com/svn/plugins/test_helpers
Scenarios
- Scenarios are a drop in replacement for YAML fixtures. Instead of encouraging you to create a mindless amount of raw data in the form of YAML, scenarios encourage you to create code that populates your tables with the appropriate records.
svn: http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios
- The Mocha plugin allows mocking and stubbing within tests. The big advantage it has over other mocking and stubbing libraries is its ability to mock and stub individual class or instance methods on concrete classes.
svn: svn://rubyforge.org/var/svn/mocha/trunk
- This plugin makes it easy to write Watir tests in Rails. Supports IE and Safari.
svn: svn://rubyforge.org/var/svn/watir-on-rails
- This plugin is a Capistrano 2.0 recipe that runs your tests on deploy before the final symlink test.
svn: svn://svn.spattendesign.com/svn/plugins/run_tests_on_deploy
- Provides a visualize_response method to your functional tests which automatically opens the response body in the default browser. Handy when testing with assert_select.
svn: http://respvisualizer.rubyforge.org/svn/response_visualizer/
Webrat
- Webrat lets you quickly write robust and thorough acceptance tests for a Ruby web application. By leveraging the DOM, it can run tests similarly to an in-browser testing solution without the associated performance hit (and browser dependency). The result is tests that are less fragile and more effective at verifying that the app will respond properly to users.
svn: http://svn.eastmedia.net/public/plugins/webrat/
FixtureReplacement
- Simple way to quickly populate the test database with model objects without having to manage multiple, brittle fixture files. You can easily set up complex object graphs (with models which reference other models) and add new objects on the fly.
homepage:
http://replacefixtures.rubyforge.org
svn:
http://thmadb.com/public_svn/fixture_replacement2
Testing a single test/testcase/spec/example
rake test:blog_:create
homepage: http://pragmatig.wordpress.com/2008/03/19/testing-a-single-example-spec-testcase-test/
Railscheck – Generic semi-static Q/A verification tool for Rails projects.
- A semi-static verifier for your Ruby on Rails projects. Delivered as a Ruby gem it provides a shell command task “railscheck” that you can run against your Rails projects to test for a number of typical bugs and inconsistencies. See: http://railscheck.rubyforge.org/