Archive for Selenium

Follow-up on HttpWatch integration with Selenium

Simon Perkins of Simtec Ltd (makers of the HttpWatch plugin for Internet Explorer that I mentioned before) was kind enough to get in touch with me via email about my wishlist for YSlow / HttpWatch / AOL Pagetest.

He wasn’t familiar with Selenium, but said that it might be possible to hook up HttpWatch to retrieve performance data dynamically. He pointed to a blog post describing how to do so with Watir, an automated web testing tool written in Ruby. Simtec even has a tutorial about this on their own web site.

While that does sound interesting, it looks like Watir interfaces with HttpWatch with a COM object on Windows, and that’s how it gets the performance information.

The way to do this integration with Selenium would be to expose a set of JavaScript APIs (maybe the same set of objects available through the COM layer?), so one could write JavaScript code to export the HttpWatch information. That’s really what I would love to see.

If that was available, I could write a simple Selenium RC test suite in PHP, remote control a set of browsers from my Linux box, and get access to this performance data from HttpWatch by simply running some JavaScript function.

YSlow wishlist: JavaScript API to export performance results

Here’s one thing that I wish YSlow (or even HTTPWatch or AOL Pagetest) supported: a way to dynamically export the results of the performance grade results. In a perfect world I would run a set of Selenium tests on my development environment, and get access to YSlow’s results from the Selenium API.

Selenium RC allows you to write unit tests in PHP (or a bunch of other programming languages), and get access to the browser as it is executing your test. If you could get access to YSlow’s results from JavaScript, then you could export that information directly to PHP, parse it, and store it. Add a few scripts to build some simple reports and you are done: performance metrics that you can track and act upon.

I was going to suggest this feature at Velocity last week, but there was no time for questions on most of the sessions. Here’s hoping this doesn’t happen next year.

Using Selenium RC with multiple users

Zachary Fox (from Alert Logic too) wrote a very good tutorial on how to run Selenium RC to execute unit tests in a team environment.

If you have multiple users running unit tests concurrently against the same Selenium RC server, some nasty things may happen. Zach explains how to properly setup multiple Selenium RC servers, so everyone can work on their own server.

Web App Testing with Selenium

I gave a presentation yesterday about using Selenium (IDE, RC, etc) for testing web applications, and I have uploaded the PPT to Slideshare. If you missed the meeting last night, you can read the presentation below.