I have a friend who is in the QA/testing world, and in his new job, he said they used Ruby for testing, and asked how do you go about navigating a website and parsing responses. I mentioned LWP and WWW::Mechanize, and said there was likely the same sort of thing for Ruby.
Then he said they were using WATIR (apparently based on Samie-a perl based library) and WET. For those who are as ignorant as I was about such things, these actually drive a browser (IE on Windows only - though there are alternate versions of WATIR for other browsers) rather than just talk the http protocol like the LWP based solutions. So if the site being tested is reliant on JavaScript, you can still test the site, whereas with LWP, you're out of luck.
Asked which I would prefer, I said that if the site relies on JavaScript (or you just want to test the JavaScript), then these other tools are great, but if it's plain form-filling and GET-ing and POST-ing and testing links, then you may as well use a WWW:Mech (w/HTTP::Recorder) type solution. His feeling was that since you'll be using a browser, it ought to be tested with a browser. I ran across one person who thinks there's value to using both approaches, but the management mind-think is probably "let's standarize on one tool."
Re:WATIR
phaylon on 2006-11-22T19:30:02
I think Selenium could also be mentioned here. (See WWW::Selenium on CPAN)Re:WATIR
runrig on 2006-11-22T19:42:33
Yes, thanks. I ran across that in my googling (and is in one of the links above), but forgot about it.Re:WATIR
runrig on 2006-11-22T19:36:21
Ok, s/based on/inspired by/ (as it says on the 'alternate' tools link above). I blame it on lack of critical thinking while writing.