Wednesday, February 16, 2011

Wednesday Book Review: Selenium 1.0 Testing Tools: Beginner’s Guide

As many of you know, I am in the process of doing a long form review of this book for my blog under the PRACTICUM heading. For various reasons, that project is going more slowly than I intended (mostly because I’ve changed jobs and I’ve been strapped for time to get the final three chapters finished, but they are in process). However, I have read this book and feel it deserved its full and appropriate review ( Packt Publishing has been very nice to provide me a copy of the book, I feel it only appropriate to respond with a timely enough review to make it worth their while :) ).

Selenium 1.0 Testing Tools: Beginners Guide is exactly that. It is a book that is aimed at those who are beginners with the technology (not necessarily beginners to testing or coding). Overall, David Burns has written a good book here. The conversational style is helpful; you feel like you are talking to a team-mate who is explaining the system to you in a friendly and engaging manner. The exercises selected are of a level that you are eased into working with the technology and the tools. The first five chapters are dedicated to the Selenium IDE, which for many testers is all they will ever see of Selenium, and for many testers who want to automate front end tests on Firefox, it may be all they ever need. If that’s the case, the first five chapters will give you a lot of practical information and give you some solidly ninja levels skills to write tests and make them robust and solid. They will be limited to the Selenese format, but even with that limitation, there’s a lot of cool things that a tester can do, from declaring and using variables, calling JavaScript events, and managing for examining objects and creating robust tests to help enhance testing.

The second half of the book deals with Selenium Remote Control (RC) and here is where some deviation takes place, at least for me. First off, to be fair, let me get a couple of things out of the way. I did not have the exact environment described in this book. I was close, but I had some set-up differences that caused some headaches. A number of the examples in the book just flat out would not work for me. Since my environment was different than that recommended (a Windows 7 machine on a 64-bit Athlon processor), I can’t hold David responsible for my roadblocks. It does, however, show a critical issue with the Learn by Doing format of this book. If everything is the same, the format is terrific, and the first 6 chapters I was able to accomplish most of the project objectives and practice using the tools as listed. When I found myself stuck, there was little I could do to get around the issues. Be aware of that going in, your mileage may vary with the examples shown in the book.

Another frustration I had was specifically in Chapter 7, which dealt with writing your own scripts in Selenium RC. The chapter is structured around using the IntelliJ Idea Java IDE. In and of itself, this is not a bad practice, but when things start to not line up due to environments being different, adding an IDE into the mix can add even more complications and details to keep track of. While I appreciated the clean nature of integrating JUnit and the Selenium libraries under one roof, it added another layer that I personally felt might have been better handled by not including another tool. Agreed, CLI’s are not sexy and they require repetition that the IDE doesn’t, but I would have appreciated more specific examples and more complete examples. As it is, to get around the behaviors I was seeing, I generated tests in the IDE, saved the structure as a separate file, and then loaded that file to write my tests.

Again, these criticisms are actually pretty minor, and they are colored because my own environment had trouble with the examples (of which David states that 64 bit environments will have issues). Overall, this is a great first effort in describing the tools and the methods involved in loading, installing, and working with the Selenium stack. As the technology becomes more well known and solidifies, I’d like to see what David does with a future Selenium treatment. There’s a lot of gold in here, and a few pieces of pyrite (and again, I have to take responsibility for my own panning), but all in all it fills a void for documentation for Selenium with a continuity that a beginner can appreciate and get productive with quickly.

No comments: