Laziest Experience Report of Selenium Conference 2011
Okay, I admit - I was a bit lazy to write, but hey I had a baby boy in Feb and took time off to play with him and took him to our native place in India. All important stuff right?
Okay so about the conferences - I was in USA for close to three weeks and attended STP Conference in Nashville and WATIR day and Selenium Conference at San Francisco. I started my vacation right after Selenium Conference and I am back again in UK now. I am following LIFO (Last In First Out) to cover Selenium Conference in this post and will cover WATIR day and STP Conference in due course.
Selenium Conference was completely sold out and even for workshop day on Monday - there were little over 300 people in the room. It was a bit of challenge for everyone to follow workshop because of the network related issues, but nevertheless, all the sessions were really interesting and informative. I will not get into the details of every workshop and just summarize few key points from my tweets and notes -
- If you are interesting in exploring how to automate flex or flash application using Selenium, have a look at https://github.com/mde/flex-pilot/wiki
- There was plenty of focus on Page-Object Model for test automation and many experts shared their experience on what have worked for them and what has not. Some of the advices given by them were
- When using page object model for test automation, sharing locators across pages is not a good idea.
- Final test scripts should not have Selenium Calls in them, Selenium Calls should be abstracted. This gives freedom to change / upgrade tools without affecting the final scripts.
- If possible, xPath should be avoided as they are brittle and slower - specially on IE. At this point some one in the audience gave their first hand experience of how slow IE is in processing xPath. It took them 30 minutes to execute their scripts on IE and around 3 minutes on Firefox. Wherever possible, CSS Selectors should be used instead of xPath
- Jarib gave a very informative introduction of webdriver and used example present at https://gist.github.com/902119 to give participants glimpse of how scripts in Selenium-Webdriver looks like.
- Jarib mentioned that Watir-Webdriver supports all the HTML tags from HTML 5 specs.
- Another example Jarib did in the workshop to demonstrate page object model is at https://gist.github.com/902399
- Different browsers decides differently when a page has finished loading, for some browser it may happen as soon as onLoad event is triggered.
- It is easy to use different firefox profiles with WebDriver - Create object for desired profile and use it when driver is created.
- If you are planning to migrate your existing Selenium scripts to the web driver world, WebdriverBackedSelenium and WrapsDriver will be your friend.
- WebDriver has got much cleaner API and it's ability to use findElement(By.id).. and ability to chain them can remove the need of using xPaths in the automation.
- PageSpeed and Yslow are some of the client side tool for looking at performance data of web applications.
- On average, browsers have around 10 connections to get all the resources from a website.
So you can see from the list - how informative this whole day was. I personally feel that it would have helped to have less number of folks for the workshop day as that would have allowed everyone to work out the examples. There were many interesting folks at the conference and Michael, Marlena Compton, Dawn Cannan and Patrick Wilson-Welsh created an interesting name for their table - Table of Trouble. Unfortunately, I like to sit in the front row and so could not become part of the table - but nevertheless it was nice to see live tweets from table of trouble.
Second day started with the key note from @hugs. He shared with everyone that Selenium is the best cure for Mercury poisoning and that's how it was named :-) It was also interesting to know that Selenium is number 2 testing tool in the market at the moment. Some of the interesting takeaway for me from day 2 were -
- Dave Hunt and Andy Smith talked about the automation of Canvas applications using Selenium - apparently DOM of the Canvas application shows only DOM and thus makes it unsuitable for Selenium.
- Andy and Dave gave some useful tip for successful test automation projects for Canvas applications - Establish test requirements, write automation hooks, consider visual feedback, work together and create tests.
- There were few sessions aimed at Cucumber, which is an extremely useful test automation tool for Behaviour Driver Development or BDD. Cucumber can work with Selenium, Watir, Steam, Capybara and Celerity. Cucumber makes test much more closer to business by defining them in plain english language and constructing them in Given/When / Then format. There are many interesting features in Cucumber such as tags which can be used to group tests nicely. cukes.info is the go to place to learn Cucumber by the way.
- Adam Goucher made goal of the test automation very clear - there should be one main goal for test automation and it is to let human test higher quality build with greater efficiency.
- Kevin Evans from Concur shared his experience that script development was three times faster with Selenium as compared to QTP.
- Few more good advices were offered on how test automation framework and automation projects should be handled. Some of the advices were on the lines of -
- Brittle scripts usually come from brittle locators.
- Heuristic for test automation - If you try to write test automation without using your brain, you will fail every single time.
- Test scripts should do just one thing, if you need to use and to describe function of a script - you are doing it wrong.
- Navigation.Timings or Web Timings are the standard built into the browsers to capture load time.
- Timers around Sel. command, WebTiming API, Firebug/NetExport, proxies & sniffing network traffic are few ways to do client side performance testing for web applications.
- I am sure you have heard it many times that CSS Selectors are much faster, but if you did not believe it yet - have a look at https://gist.github.com/902866 to see results of an experiment by @santiycr
- JQuery uses CSS selectors and JQuery is used by a little over 33% websites - one more reason why you should use CSS Selectors in Selenium. Also, CSS selectors are not limited to CSS specs, few selectors are introduced by JQuery and they are also supported by Selenium.
- BTW, if you do not know how to find CSS selector on a page - try http://www.selectorgadget.com/
- Next session I attended was in Track B and was not related to Selenium directly, but was very relevant. It was about a framework to test applications end-to-end on mobile platform and is called MOET. You can have a look at the whole presentation at http://www.slideshare.net/eingong/moet-7557723 MOET is the simulator libraries for BlackBarry and Android phones. Android Virtual Devices (AVD) and Android Debug Shell (ADB) can be used to launch and debug android apps and Fledge.exe can be used to launch different versions of BlackBarry. Have a look at MOET at https://github.com/eing/moet . It makes it possible to write device independent tests for BlackBarry and Android. Though MOET is a nice tool, it does not simulate network performance & hardware control and its reliability greatly depends on the reliability of simulator MOET is driving.
After panel discussion and closing keynote from Patrick Lightboy - first day of Selenium Conference came to an end. Next day started with the keynote from Bret Pattichord and he gave some really cool analogies such as "Railroads were the Internet of the day" and "how test harness (Wind Tunnel) was built before aeroplane could be built". In his keynote, Bret mentioned the vicious cycle of test automation tools - Folk in the management were in love with the idea of record and playback and licences were constructed to prohibit folks from publishing their views about the tools. Bret shared his opinion about record and playback (Should not be used at all ;-)) and suggested that Selenese should be renamed as Selenium 0 and marked as deprecated.. It was an excellent start of the day and equally interesting topics were lined up -
- Eran started day with large scale test automation using VMs (Virtual Machines). Some of the problems he highlighted in using Physical machines with Selenium Farms were Machines have to be available all the time which consumes power.
- Scaling is not easy with Grids - Grids are hard to maintain, need physical machine and its a bit difficult to maintain head node.
- Eran highlighted the importance of identifying NEED for test automation projects - they need scaling because Google executed in excess of one million tests on thousands of browsers every day.
- Next session was on Selenium 2 Grid from Kevin - Selenium Grid maintains a cluster of Selenium nodes to parallelize your checks. Selenium 1 grid had a limitation of one node = one server and one browser. This limitation is removed in Selenium 2 Grid. Node can have multiple browsers in Selenium 2 Grid.
- Next session was focussed on the Cucumber and Selenium again. Andy mentioned that avoiding vendor and script lock-in was one of his major goal for test automation and that's why he opted for Selenium. Andy highlighted the importance of planning test scenarios in the feature planning meetings and writing business focussed tests and code and need to use randomizing data and sequence in test automation.
- After Andy's talk, it was my turn to take the stage in the Track B to present my talk "Magic of Modular Test Automation" - Have a look at https://docs.google.com/present/view?id=dc6w9tqw_76hqd8k4dm and let me know if you have any questions.
As soon as this talk was finished, I had to rush to present lightning talk on "Power of Patterns" on the main stage. It was essentially the same presentation we did for London Tester's Gathering - you can have a look at this at http://www.testinggeek.com/patterns-in-software-testing-and-a-claim-icheckwebsite
- Lightning talks were really intense and there were very entertaining advices such as
- Don't be a nice guy, punch devs on their face :-)
- Don't be religious about tools, technology changes all the time
- Flaky tests can destroy your test automation and your credibility.
After the lightning talks, it was time for the final and closing keynote from Simon Stewart and made it clear that it's in everybody's interest to move from Selenium 1 to Selenium 2 - because that's where action is going to happen. He also highlighted the need to have support for test automation built into the browsers itself by demonstrating speed of execution (400 tests were executed in little over 2 minutes) with latest chrome web driver. It was possible because of the support built into the browser itself.
So overall, it was a great experience and it was great to be in the company of people who gave Selenium and WATIR kind of tools to the testing community. BTW, I am sure most of you have already read fastest (or live :-)) experience report from Selenium conference by Michael - if not you might want to read following posts.
Do you like this post?
Subscribe to receive new posts via RSS or email. Join!

