Coming Up for Air

Writing Selenium Tests for the GlassFish Admin Console

Thursday, March 25, 2010 |

One of the results of the Oracle purchase of Sun has been an increased focus on testing — not that we didn’t test GlassFish before, but it was mostly manual in my area of the server. The task of automating this fell to me, and, after a little — ahem — testing, I settled on Selenium.

For those that don’t know, Selenium is a web application testing tool. It has a number of different modules, including the Selenium IDE, which is used to help write tests, and Selenium RC to run the tests. Selenium server, which actually interacts with the browser, is, for us, a transitive dependency through RC.

At any rate, I’ve been working on a number of tests for the GlassFish Admin Console to try to cover as much of what we currently have running as possible. At some point, I need to get out of writing tests and back to writing code, so I need to document what I’ve done, which is where this post comes in. I started out writing a step-by-step tutorial on how I use Selenium, but that was almost guaranteed to be hard to follow, so I created a screencast (using screencast-o-matic, incidentally, which is a Java-based tool. It runs on any platform, with no installation required. It’s pretty slick : ). What you’re about to see, then, is a demonstration of how I’ve written the 40+ tests we have so far. Nothing says this is the only way to do it, but I’ve found it pretty fast and effective.

Without further ado, then, I present the Jason Lee masterpiece,

Instant classic!

Search

    Quotes

    Sample quote

    Quote source

    About

    My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

    I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

    On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

    My Links

    Publications