views:

380

answers:

3

We're starting to standardise on a Ruby-based testing framework, having had some very good results out of RSpec and Cucumber-based testing recently. As this is a large enterprise, we're going to attempt to put together a "standard" set of Ruby gems for testing, knowing we're only ever going to get it ~90% right because of the broad mix of technologies being used.

Key technologies we've identified so far that we need to be able to support:

  • message transport layers: WebSphere MQ, Tibco (within our test cases, we need to be able to read/write messages & clear queues)
  • databases: SQL Server, Oracle, Sybase (we need to be able to do CRUD operations on each of these as part of our test cases)
  • user interfaces: Web, .NET, Java/Swing, Silverlight (ideally we'd be able to automate driving each of these UIs through an appropriate interface)

As a starting point, we've decided we want the following set of gems installed (in addition to those that come with Ruby itself):

  • cucumber (plus hoe and other dependencies)
  • rubywmq (for testing involving WebSphere MQ)
  • webrat
  • watir (for those cases where webrat won't cut it)
  • rails (not so much for Rails itself, but for activerecord and the various DB drivers that come down as dependencies, as well as rake)
  • ruby-oci8 (for Oracle)

For Silverlight apps, we hope to be able to test them through IronRuby, but that's very much unknown territory for us at this point.

Two questions:

  • any other key gems we've missed? Stuff that you just can't live without? What's good/bad/ugly?
  • any sources of reference for driving Java/Swing, Silverlight and .NET user interfaces? I'm aware of the RSpec book, but are there any others out there?

Thanks in advance

+1  A: 

I would add

  • Mocha. If you use Cucumber, Rspec or ActiveSupport, chances are it will get loaded automatically if installed.
  • Test::Unit or RSpec. The first one isn't a GEM, it's a standard Ruby library. Personally I'm a Test::Unit guy rather than a RSpec user, however you might want to give RSpec a try.
  • Shoulda Shoulda consists of test macros, assertions, and helpers added on to the Test::Unit framework.
  • Remarkable Remarkable is a port of all Shoulda macros to RSpec.

Also you might want to use

  • RCov to check your LOC

Not strictly related to tests but always about code quality:

  • Flay analyzes ruby code for structural similarities.
  • Flog shows you the most torturous code you wrote.
  • Reek a code smells detector for ruby
  • Roodi parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
Simone Carletti
Great answer - I've used Mocha before, but most of the rest are new to me. Thanks you for taking the time to create this list
A: 

Nokogiri for parsing XML is another one

Omar Qureshi
AFAIK, webrat depends on Nokogiri so you'll get it installed when you install webrat.
Simone Carletti
A: 

Zentest, it is very Important for testing

Also Mongrel or Passenger for application deployment

Rishav Rastogi
Thanks for the suggestions, but I should've described our situation a bit more clearly. We don't do Ruby development (at this stage); we're just using Ruby to test our Java/.NET applications.