Monday, July 21, 2014

"Selenium 2 Testing Tools" - book review

In this post I will do a book review about a book called "Selenium 2 Testing Tools" written by David Burns. It is a beginners guide for Selenium 2 published 2012 by Packt © Publishing.

It is fairly new and it covers basic information about all aspects  of Selenium 2.
In 11 chapters and two appendices it manages to help reader get basic understanding about Selenium using code examples and little chapter quizzes. First of all you need to install necessary software like Java jdk, InteliJ Idea, selenium - server standalone, selenium IDE plugin for Firefox, Firebug and Firefinder.

Chapters:
  1. Getting started with Selenuim IDE, where you get the basics of using Selenium IDE Firefox plugin. Recording your own test case and test suites. Adding test comments. Asserting and verifying tests with Selenium commands. Using multiple windows and testing Ajax applications.
  2.  Locators, where you learn basic HTML element locating methods. Searching tag elements by ID, name, CSS selector, XPath, DOM and text link again using Selenium IDE. 
  3. Overview of Selenium WebDriver, where you get introductory text about creation of Selenium tools and how it is structured. 
  4. Design Patterns, where you use Page Object and Page Factory patterns to code your selenium tests. Also using LoadableComponents in your tests
  5. Finding Elements, where you use Java code, junit testing frameworks and Selenium WebDriver run tests for finding html elements by ID, name, XPath, CSS, DOM and link text. In Selenium API you find one html element or you can find a list of elements that cover certain criteria.
  6. Working with WebDriver, where you get know all basic drivers for each of the most popular browsers, Firefox, IE, Chrome, Opera and you do some basic Java tests. In this chapter I found that FirefoxDriver is part of Selenium WebDriver while IE and Chrome need additional libraries to run from selenium. As for Opera there is a library that covers only versions up until Opera 12.x built on presto engine. For newer versions there is still no support by Opera team(not sure, have to check). Libraries: selenium downloads, IE driver, IE driver downloadsChrome driver, Opera driver
  7. Mobile devices, where you get to test web applications that run in Android, iPhone and Opera Mobile browsers. Libraries: Selendroid (replacement for the obsolete AndroidDriver).
  8. Getting started with Selenium Grid, where you get to understand how to make selenium tests that run in parallel on several machines and on several browsers at the same time. Also on different operating systems, like Windows and Linux. So basically selenium server can be run as a grid hub, but also as a node. 
  9. Advanced user interactions, where you use selenium webdriver to run keyboard and mouse based tests. Also you will use Actions java class for performing sequence of mouse/keyboard actions which is handy. 
  10. Working with HTML5. In this chapter you are visiting application cache, browser connections (online/offline), WebStorage (local and session storage).
  11. Advanced topics. In this chapter you will learn, how to capture screenshots when error appears with selenium webdriver, use XVFB buffer to test application without interference with the tests (works only on Linux) and Browsermob Proxy to monitor web application traffic.
  12. Appendix A, Migrating from Remote Control to WebDriver
  13. Appendix B, Pop quiz answers
Some useful links:

http://www.packtpub.com/selenium-2-testing-tools-beginners-guide/book
http://book.theautomatedtester.co.uk/
http://docs.seleniumhq.org/
https://code.google.com/p/windowlicker/
http://bmp.lightbody.net/
https://media.readthedocs.org/pdf/browsermob-proxy-py/latest/browsermob-proxy-py.pdf
https://github.com/webmetrics/browsermob-proxy
http://stackoverflow.com/questions/944086/is-there-anything-like-xvfb-or-xnest-for-windows
http://en.wikipedia.org/wiki/Xvfb

According to my experience, it does what is meant to be, aka introducing selenium 2 trough examples and information. Apart from some code errors and obsolete tools like AndroidDriver which today is replaced by SelendroidDriver it is very well made book. If you are just starting with selenium 2 testing tools this is the book to choose. I give it 4.5/5

Perhaps this is the next good read, Selenium testing tools Cookbook,
Selenium WebDriver Practical Guide

No comments:

Post a Comment