views:

804

answers:

7
+2  Q: 

Do you use WaTiR?

Is there a better unit testing tool than WaTiR (tag) for Ruby web testing? Or is the defacto standard? What unit testing tools do you use?

+5  A: 

We use it for all our web application testing, not just ruby based web applications. We did look into a number of products but felt that WaTiR was the best. Plus it is in Ruby so we can pat ourselves our backs and tell each other how cool we are for using Ruby.

stimms
You're so cool :-)
Orion Edwards
I acutally ended up doing some work with WaTiR and also selenium a few weeks ago. I have to say selenium was much more pleasant to use.
stimms
A: 

We had a look at WaTiR a few years ago and decided against it for various reasons, mostly around ease of use compared to the likes of selenium (as in writing code vs visual tools).

It's worth mentioning that the people who were doing the test-building where not developers let alone Ruby developers.

This also wasn't for ruby apps, but as it's the web and the web serves HTML it shouldn't matter what it's built with.

SCdF
+2  A: 

Used as web crawling tool. WaTiR is also great for testing as I have heard. Be aware that each browser has their own version of WaTir: WaTiR(IE), FireWaTir(Firefox) and SafariWatiR(Safari).

+3  A: 

After taking a long look at waitr, my team decided on Selenium.

Among the many reasons were:

  • The one that Steven mentioned, Selenium has better browser and cross-platform support. We currently have machines running mac, linux, and windows with safari, firefox, and ie.

  • Selenium tests seemed to run faster than waitr, especially if you take advantage of selenium grid.

  • Selenium tests could be written in a wider variety of languages than just Ruby.

  • Selenium has an easy to use IDE.

Ryan Guest
A: 

Worth noting that the FireWatir project has been rolled into the Watir core and the codebases integrated as of the 1.6.2 release last week.

Jeffrey Fredrick
+1  A: 

I didn't feel that I could mark any 1 of these as an answer.

From what I see from the responses, is that WaTiR is one of the best if you're sticking with Ruby as the testing language.

I personally agree with Ryan Guest about Selenium due to the cross browser support and language-agnostic approach. On the other hand, it uses it's own language, so it's one more thing to learn.

Scott Hanselman has a podcast titled Functional Testing Tools Roundup that sort of talks about this question.

When it comes down to it, I think the answer is that WaTiR is a great testing tool if it fits your situation.

Mufasa
A: 

Hello,

I have been using Watir since 2007 but more as a scripting tool than an unit testing tool.

As a manual tester, it is very useful for some repetitive tasks, but I never got around to actually use it "properly" (creating test cases to see what features are failing and whatnot).

Also, I have showed Watir to some friends of mine who are programmers and they are using it to help them during development of systems written in Java, PHP and even ASP, so just because Watir is a Ruby project, it doesn't mean you should use it only with other Ruby projects :)

Felipe Knorr Kuhn