Saturday, 15 January 2011
Review - Selenium Simplified
A few months ago I thought it was time to learn more about Selenium and as I was a subscriber to the Evil Testers blog I noticed he had an ebook out – Selenium Simplified.
I paid and signed up, got my copy and had a quick read through but was too busy to look into it in any great detail. Then along comes Xmas and the best present from Santa – time to catch up on a lot of things that were on the back burner and first on the list was working through Selenium Simplified.
The book has 38 chapters and took me around 7 days ( full days ) to get through.
It’s written in a very informative, friendly style, full of tips and information.
Starts off easily with loading your machine up with the necessary bits – Java, Junit, Eclipse ( the book is very java centric ) and of course Selenium IDE and RC and guides you through starting off with Selenium – using the IDE and then running Selenium RC
Which is where I ran into my first problem
“Selenium is already running on port 4444. Or some other service is.”
A quick Google and I found an answer and learned how to use netstat
With that problem solved it was onwards and upwards and with the not evil at at all Evil Tester guiding me I was soon writing my own tests in Eclipse. Having written some basic tests the guide then took you through refactoring the code – not something I’d ever done in my programming days so that gave me a real sense of satisfaction.
This was something I really liked about the book – started off with simple tasks, guided you through them very well and then took you onto the next steps and gave you a sense of achievement and confidence.
The guide also gives you useful minor tips – in all my years of programming I never knew that you could give the Command window a title. A small tip but a very useful one when you have several windows open
The book also does not stick to Selenium but also gives a guide to the basics of Junit, refactoring ( as mentioned above ), Xpath and Css theory etc etc
Basic tests written and refactored, Xpath and Css and HTML forms and Javascript tried out the next step was to use Ant and Hudson. Having read about Ant but never used it in anger it was yet another useful exercise to see and understand how this works.
Just this would have been a good introduction to Selenium but the guide then goes on and takes you through setting up a Selenium Manager Class, using Page Objects, Data Driven tests, running the tests on multiple browsers, cookies and Ajax.
The book comes with source code which is useful when you’ve got carried away and think you know it all and find you have a null pointer exception ! This incidentally was another good learning exercise – a reminder of how easy it is to introduce defects
The penultimate chapter works through all the previous learnings and shows what a ‘production ready’ version would look like. Not only is this chapter useful in itself but it really brings home how much you’ve learnt by the time you reach this part.
Indeed, by this point I had a laptop with a lot of new tools to play with, confidence in having learned and achieved something and found that although it had been an intensive time it was enjoyable. So I looked at the recommended reading section of the book and ordered myself Agile Java…
In summary I found the book to be really useful, and nicely paced.
Recommended
Subscribe to:
Post Comments (Atom)
1 comment:
Interesting stuff, Phil.
I don't suppose the book told you how you could build UI Maps of the application under test, did it? Or even better, whether it could learn the UI Maps to save a lot of admin.
Just started playing with Selenium last week. :)
Regards
Del.
Post a Comment