Leader of Birmingham.pm [pm.org] and a CPAN author [cpan.org]. Co-organised YAPC::Europe in 2006 and the 2009 QA Hackathon, responsible for the YAPC Conference Surveys [yapc-surveys.org] and the QA Hackathon [qa-hackathon.org] websites. Also the current caretaker for the CPAN Testers websites and data stores.
If you really want to find out more, buy me a Guinness
For sometime I've been meaning to get Selenium to do all my page rendering testing. In Labyrinth I have command line testing built-in, so have mostly been relying on that. Having seen Luke Closs' presentation at YAPC::NA last year in Chicago, I was quite impressed by what he was saying it could offer. However, Luke's talk dealt more with what you could do with the application, rather than how to install and set it up.
I've just spent the last weekend trying to figure this very basic bit out. In the end it wasn't difficult, but as the documentation of how to set it all up is limited at best, and provides nothing of the 'what if this doesn't work' or 'I got this message, what does it mean?' type of FAQ documentation (or at least none that I could find), it got to be a little frustrating at times.
It took a while, but I did finally get it all installed and managed to get the remote control server to work. The biggest problem was actually trying to get it to work with Firefox. The solution was to scrape the idea of using Firefox and use Internet Explorer instead. While I have no doubt that Firefox may well be supported, the explanation of how to get it to work under Windows is nowhere to be found. The suggestion of adding the full path didn't work either. I'm hoping somwhere there is a simple explanation for using Selenium, Firefox and Windows, and maybe even someone reading this might be able to point me in the right direction, but until then I'll have to stick with the *iexplore route.
Once I'd finally got a working selenium server, I was able to set about writing my test cases. Only to hit another brick wall. All the example scripts I've seen, all mention a package called SeleniumUtil.pm and function called server_is_running(). However, they don't exist in the CPAN downloads and are not part of any distribution. It brought back a few dependency hells I've seen with cpan-testing before now. After googling, I did find a copy of the package eventually, and stored it locally. I could then start writing my test scripts.
The docs for WWW::Selenium and Test::WWW::Selenium, while they might read well for someone who already knows Selenium, as a newbie, they could both really do with a beginners guide, together with a few example scripts that really do some basic things would go down well. After some trial and error and rereading the docs several times, I now have a simple test script that tests around 100 links on a small site I've done. Now that I know a bit more of how it all works, I'm going to start expanding my tests and start work on testing the admin processes too.
All this has made me realise what a goldmine Selenium is, and has left me wondering why there aren't half a dozen talks at YAPCs, etc. extolling the virtues of it. So I've decided to take at least one step in helping to change that.
I'm going to work on a beginners guide to Selenium, which hopefully Luke won't mind adding to one (or both) of the Perl packages, and I'll also start work on a presentation to give an introduction to the application. It'll give me another presentation to offer to those attending the Birmingham.pm World Tour and YAPC::Europe too
So, seeing as there isn't alot of examples out there, does anyone have any local test scripts that you'd be willing to let me use to help expand an 'Introduction to Selenium' presentation?