Saturday, September 01, 2007

Tools for UI Testing Coming Around...

In case anyone missed it, as I almost did, a technology that had been called Koala was released by IBM as CoScripter. Here is the post. I, for one, am jazzed about this.

There is an opportunity here that I want to try to take advantage of. It has been possible, for at least a few months, to use JavaScript to create events and throw them at a DOM tree and see what happens. Some really good work went into making this possible.

But it has been made possible. It has not been made easy. As far as I know, there has not been a flood of new mochitest test cases using this API to test the UI in Firefox. Which is a shame. There is a lot of good testing that needs to be done.

Right now, most UI testing is done via the "clicks and eyeballs" harness that is housed at Building K of MoCo Central. These people do a great job with what they are given, but frankly they should not have to do it all. If the UI was more specified and the development of automated tests was part of feature development, there would be less fire drills at release times. Fire drills may be good for building esprit de corps in an organization, but it does not always lead to a quality release. When we hear of a successful fire drill at MoCo, we should be glad they got through it, but we should be worried that it happened.

What does this have to do with CoScripter? Am I done with my MoCo org rant? Yes, I am. And let me tell you.

Last time I heard, CoScripter records JavaScript events. I still have to confirm this. A lot may have happened since this was shown at MoCo in February and it was said that it would be released "any day now" and then "when IBM legal signed off". And hey, it only took six months. Those lawyers must have really burned the midnight oil, yes? :-)

The point is that it may be possible to record a user doing stuff, and then turn that into an automated test case. I am sure some processing of the resulting recording will have to occur, but I have done automated test case generation with a UI recording tool at Apple (that is proprietary and shall remain nameless), so I am pretty sure it can be done.

Imagine a user being able to turn on an extension, and then do something that causes whatever error they are seeing, and then just drop that into a bug. It would certainly make user's bugs a bit more informative. And more automated UI tests? This cannot be a bad thing.

Hopefully I can do this and not fail my classes this semester. We will see. :-)

2 comments:

hugs said...

We've been doing all the things you suggested for years with Selenium (openqa.org). The Selenium IDE for Firefox records and plays back tests in a similar fashion to CoScripter, although without the natural language syntax.

Selenium itself has been around since 2004, we're using it heavily at Google for many of our "Ajaxy" web apps. The best part is that, unlike CoScripter, Selenium is free and open source! You can start using it to record UI bugs and post them to your bug tracker today.

Unknown said...

If you want END USERS to record and report bugs, better use the iMacros for Firefox extension. It is much more (end) user friendly than Selenium. Selenium is a good web testing tool but it was never designed for the casual user.