Improving Selenium IDE

Posted: July 7th, 2010 | Author: Dave | Filed under: Improvements | Tags: , | 1 Comment »

I’ve been working on a new formatter plugin for Selenium IDE, and along the way I discovered some quirks (not necessarily bugs) in the code. After a few discussions with some of the Selenium community, I decided to get stuck in and see if I couldn’t make some improvements. In the interest of sharing my experiences, here is what I did.

Format header/footer caching
For some reason (still not clear to me) the Selenium IDE formatter headers & footers were cached in two places, the TestCase itself, and also within the Format. I was finding that when switching between my new format and the default HTML, whichever I used first was persisting as the header/footer for the other. This could be fixed by using the Formatter cached header/footer but as I couldn’t see any advantage of caching this content, it seems like an unnecessary and overcomplicated solution. So I removed the caching entirely.

Updating variables in format source
The other main issue I had was when updating the base URL in Selenium IDE the format source is not updated. By removing the caching I’d partially solved this, but it still required the user to switch to another format and back again. Also, changes to variables from the format options pane also need to update the format source. I was able to find the appropriate place to initiate a refresh of the format source.

Setting the initial base URL
Finally, I had an issue where the initial base URL in the format source was not correct. When I tracked down the right place to put this minor fix I found the line I needed was already there but commented out! After a quick check, it appears that the change may have been a mistake, so I brought it back in and ran a few successful tests.

Obviously these changes are fairly significant, so the next release of Selenium IDE (1.0.8) will need to be well tested. At this time there isn’t a build available with these changes, but if you are confident with running a potentially unstable version you can check out from SVN and build Selenium IDE yourself.

Please get in touch if you have any feedback. You can raise any issues you find in the official issue tracker. Please label them as ‘ide’.

Stay tuned for more details on my new formatter – I have a few more issues to work through before I’m ready to release it, and some of these may even involve further improvements to Selenium IDE.


Improving Selenium Grid

Posted: November 27th, 2009 | Author: Dave | Filed under: Improvements | Tags: , | 2 Comments »

Hopefully Selenium Grid 1.0.5 will soon be released, with the much anticipated self-healing features that will save me so much time when RCs go AWOL. Looking further ahead, I would like to see some minor improvements to the Selenium Grid Console such as integrating this very handy Greasemonkey script for unregistering Remote Controls and sortable columns. Below is a quick mock-up of how the console could look with these simple changes.

Selenium Grid ImprovementsThe above changes I’m pretty confident I could make myself, but after trying to get Selenium Grid with a resource handler for a couple of hours I decided instead I’d mock it up and make a public plea for these changes!

While I’m at it, something I’m less certain I’d be able to do myself is add the queued requests to the console with the ability to delete them. It’s not uncommon for someone to fire off a test suite and when the first few tests appear to be failing, cancel the process. Unfortunately this means that several RCs are unable to complete, and Grid still has pending requests. In the past I’ve started X number of RCs in order to consume the remaining requests and then kill them, however I usually just restart the Grid and all RCs. Below is an idea of how this could look in the console.

More Selenium Grid Improvements