I've been working in Selenium RC for the past couple of weeks, and so far, I am pretty pleased. Selenium does some very cool things. However, it is open source, so there are some missing pieces.
Some random thoughts (good and bad) in no particular order:
- Web only. Totally cool with this, though. All of the apps I am expected to test are web-based.
- No default logging mechanisim. By my own research (which could be wrong), it seems that most people have written their own logging mechanism. I'll do the same (something rudimentary at first, no doubt). Would be a great feature, but enh, this way I suppose you can use whatever pleases you. Double-edged sword, that.
- Supports many languages. Very nice. I can write my actual tests in Java (JUnit) while I have C# (NUnit) up alongside. Given that I am more familiar with C#, this provides me some extra assistance to figure out if something is a "Theo don't know Java" issue or a Selenium issue. Most like the problem is the former, mind you.
- Since it is written in real, no kidding, full-featured development languages, you can do some pretty cool things. Don't like the default version of the objects in the API? No problem! SubClass them and go on your merry. Very sweet. Don't know how many times I've wished the script-based tools would allow for this.
- No direct access to the DOM. I can't begin to tell you how much I miss this. There are times when I'd like to iterate the DOM and do things. I used to do this a lot with other tools I've used.
- No object recognition. Unlike many of the tools available, there is NO object recognition (i.e., some repository of bits used to identify an object in a simple way) out of the box. All objects on page are accessed via xPath expressions, although this isn't too tough if you know xPath and have access to a Firefox plugin to extract the xPath from the page. You could, in theory, write utility classes that take xPath in the constructor and fake up an object if you like, wrapping the calls. I have a hunch a lot of people do this and I might do the same here if I get time. Overall, though, the xPath method seems to be as good, if not better, than the object recog. model.
- Documentation is seriously weak. A lot of what you learn is by trial and screw up. In one sense, this is effective; you tend to rememeber the things you screw up.
- This is NOT a beginner's tool! You can do some recording in the Selenium IDE version (on Firefox only), but I get the impression most people record the base test in IDE then export it to the language of their choice for modification. You probably need some dev. background to really get the most out of this tool.
- "Open" Source in this case can mean "breaks often". This is by no means a criticism, btw. Since there is a nightly (approx) build, issues are resolved and introduced all of the time. Just life in the big city. Overall, it seems the team that works on this product do a great job. Is it perfect? Nope. Is it usuable and available via Open Source? You betcha!
More on this as I get deeper into it.....
Print | posted on Wednesday, January 07, 2009 10:46 AM