From: djberg96@... (Daniel Berger) Date: 2004-05-22T14:03:47+09:00 Subject: Re: Web GUI Testing (Re: How to duck type? - the psychology of static typing in Ruby) James Britt wrote in message news:<40AC08AD.5020801@neurogami.com>... > Hal Fulton wrote: > > UI is often hard, especially GUI. > > > > But I ran into an idea the other day that I was unfamiliar with. > > > > 'Expect' is sometimes used to wrap a GUI around a text interface -- > > spawn the process and interact with it. > > > > Of course, that in itself is non-trivial perhaps. > > > > But a text interface is easier to test, especially with Expect. > > I've been using Ruby at my current job to test a web app via Internet > Explorer with the clIEController [0]. > > The downside is it only scripts IE, and (to the best of my knowledge), > you cannot get to the raw markup returned to the scripted browser, so it > doesn't help you verify, for example, that each page is rendered as you > expect. > > I've hacked some code for the controller that walks the IE HTML node > tree and emits proper XML (not actual XHTML, though) so that one can run > xpath calls, via REXML, against the markup to see that certain data is > on the page, or check that a page fetch didn't return an error page. > > If nothing else, it saves *much* time clicking through pages, filling in > forms, clicking submit, etc. My test script will spawn a score of > threads; browsers pop up all over the place, and I test a dozen > pages/site paths at a time. > > > James > > [0] http://www.clabs.org/wtr/index.cgi?page=/ClIEController Dunno if it's relavent, but perhaps a port of Perl's WWW::Mechanize module is in order. Regards, Dan