Conspiring out loud about Selenium-IDE 2.0
By now, most people in the Selenium world have heard about Selenium 2.0 which is the merger of Webdriver and Selenium (Core and RC). What seems to have been missing from those conversations is what Se-IDE 2.0 would look like. This post is a blatant attempt to get those discussions going.
To do a major version bump there should major changes introduced. With Core and RC it is pretty obvious that the bar has been reached, but what would cause a version bump in IDE? In a word:
Plugins
Using the success of the model Firebug has used, I want to see Se-IDE restructure itself to just do recording and basic playback and have everything else provided by plugins. Take a look at the list of Firebug Extensions. I would love to have a list this long for Selenium.
The reasons in more details:
- Cleaner Core – Right now, the code checked in for Se-IDE has a lot of different needs, maintainers, and bugs. Let the Core be actually ‘core’. This is doesn’t mean that Se-IDE doesn’t ship with a ‘default formatters’ plugin, as I think it probably should to maintain the current level of functionality, but inside the code there would be separation.
- Give Control to the Ecosystem – Lets say I was the maintainer of something like an ABAP formatter and someone found a bug. I need to keep track of the OpenQA Jira tracker in case someone misfiled it, fix it, submit a patch and then hassle someone with commit access to the project to not only accept the patch, but spin out a new build. There are too many points where I am not in control of my own destiny there.
- A rising tide raises all boats – This is absolutely essential I feel for us to grow a commercial environment around Selenium. Right now, companies would have to fork the IDE project and graft on their own modifications. This means you could have a BrowserMob IDE, a Sauce Labs IDE, a TestMaker IDE, an X, Y and Z IDE. It would be so much better if they could just write a plugin to the main Se-IDE. This way everyone can leverage advancements in the Core.
- Chinese Wall – The Selenium projects are licensed as Apache 2.0 which means there is some requirement to giving the code back to the community. This is a hard pill to swallow to some people, usually management who covet the firm’s IP. (And that is kinda their job.) By writing a plugin, you can say ‘This is our IP and we specifically license it thusly’. Code written outside of a plugin is ‘core’ and needs to be wrapped up as a patch and submitted, code in the plugin does not. (Now I am in no way an expert on the ASL2 license so I could be completely opposite of both its intent and spirit — but I don’t think I am.)
- We can’t predict the future – Who knows what cool new things the future brings? Not I. If I did, I would play the lottery a lot more than I already do. If Silverlight takes off, then someone could create a Silverlight recording plugin. Or maybe Flash/Flex continues its dominance and the Selenium-Flex-API project gets plugin-ized. The point is, by having, essentially a closed black box says ‘we know what is best for you, trust us’. But we can’t possibly know. It is far better for the long term health of the project to create the tools that allow further tool construction.
What else could Se-IDE 2.0 provide in the core? I think the next big win (after plugins of course) is elevating JS to official first class citizenship. Perhaps even making it the default instead of Selenese (the HTML syntax) — but that might be a bit radical. At the very least, have it as a persistent option. That would I think solve a lot of what I mused about in What to do with the Selenium-IDE?.
What something is not is often just as, if not more, important than what it is. So what would Se-IDE 2.0 not be? It would not be anything other than a Firefox plugin. Yes, people seem to think they need a Se recording solution in IE, but that is a trap! No, you do not need a Se recording solution for IE, what you need is a Se playback solution. And we have that in RC. Who cares that you recorded it in Firefox? The idea that it needed to be recorded in IE leads to things like ‘we need a native Safari recorder, and a Chrome recorder, and a Konquerer recorder. And. And. And.’ and you don’t hear that. This is an education and marketing problem, not a real problem that needs a technical solution.
So there is my ‘If I ran the world’ plan for Selenium-IDE 2.0 (and a bit of a rant at the end). I’d just do it myself if I wasn’t working two different jobs and wasn’t lacking the necessary XUL/JS skills. Let the campaigning begin!