Generic-user-small Brad Hutchins 5 posts

Can these be used instead of UNIT tests for the regular programming nuts and bolts of an application, or is it geared primarily to user interface testing.

Does it work on Web GUI interfaces (thin clients) as well as native apps (thick clients)?

Thanx

 
2201682121_40eda4245f_o_small Ian Dees 26 posts

Hi, Brad.

Can these be used instead of UNIT tests for the regular programming nuts and bolts

The book doesn’t specifically cover code-level unit testing. But the library it uses, RSpec, happens to be wonderful for unit testing of Ruby apps.

Does it work on Web GUI interfaces (thin clients) as well as native apps (thick clients)?

The book covers both Web testing (using Selenium and Watir as the underlying automation libraries) and desktop apps, with a slight emphasis on the latter.

 
Generic-user-small Cindy 2 posts

Hi.

I recently look at using Selenium for testing my application. I had also downloaded Ryan’s selenium-on-rails. That plugin doesn’t seem Rails 2.1 ready. Will I have any problems applying the information in your book in a Rails 2.1 environment? Also, if you’re familiar with the plugin, would I need selenium-on-rails to test my Rails 2.1 application or is the Selenium IDE all I need?

Thanks.

 
2201682121_40eda4245f_o_small Ian Dees 26 posts

Hi, Cindy.

Will I have any problems applying the information in your book in a Rails 2.1 environment?

The Web testing chapters in the book aren’t Rails-specific, so they don’t require any particular Rails version or plugin. (There is one sample Rails 2.0 app provided, but the test code interacts with it purely through the browser.)

Also, if you’re familiar with the plugin, would I need selenium-on-rails to test my Rails 2.1 application or is the Selenium IDE all I need?

For the book, all you’ll need is Selenium RC, whose .jar file is packaged inside the Selenium Ruby gem (that’s with a capital S). You can just do a sudo gem install Selenium, and then run selenium from the command line.

I’m not sure what the steps are to get selenium-on-rails going with Rails 2.1. I’ve written Ryan to ask him about that; I’ll post an update here if I hear back.

 
Ryan_bates_cropped_small Ryan Bates 25 posts

Hi Cindy,

Which errors are you getting with the Selenium on Rails plugin? It should be compatible with Rails 2.1. If you haven’t already, check out this Railscasts episode on the topic.

 
Generic-user-small R P Herrold 3 posts

Hi, Ian

You mention:

The book covers both Web testing (using Selenium and Watir as the underlying automation libraries) and desktop apps, with a slight emphasis on the latter.

Which widget set is used for non-browser based applications? Portability issues rear their head, of course.

 
2201682121_40eda4245f_o_small Ian Dees 26 posts

Hi, R P.

Portability issues rear their head, of course.

Indeed, they do.

For Windows, the book tests a WTL app using Ruby’s Win32API module. On the JVM, we test Swing (and a little AWT) using Jemmy in JRuby. On the Mac, we test a Cocoa app using the accessibility API and the rb-appscript library.

You’re correct to point out that, as soon as you choose an example app to test and start coding, you’re making a platform choice, and necessarily doing a few things that apply specifically to that platform. I try to mitigate this by doing the largest example in both Windows and Swing, and by rising out of the platform calls into libraries of tests as quickly as possible.

 
Generic-user-small R P Herrold 3 posts
  • * nod *

I had hopes of a lightweight toolkit (gtk+, wxWindows, Tk/Tcl) for some development work we are doing in Ruby, to use in a standalone desktop application we have (which needs a GUI skin in addition to console mode).

Probably fodder for a discussion off this thread, though.

Thanks

 
2201682121_40eda4245f_o_small Ian Dees 26 posts

Hi, R P.

I had hopes of a lightweight toolkit (gtk+, wxWindows, Tk/Tcl) for some development work we are doing in Ruby

If you’re talking about GUI building in Ruby (beyond just GUI testing in Ruby)... for simple apps, I’ve had good luck with Shoes, both at work and at home. There are also Ruby bindings for the toolkits you mention (GTK, wxWidgets, Tk) and a few others (FOX, Qt). I haven’t tried those for anything beyond just toy examples, so caveat coder.

9 posts, 5 voices