Saturday, December 20, 2014

Selenium - Web automation tool

                   

Selenium is a suite of tools to automate web apps across many platforms. It is a GUI based automation tool. Selenium first came to life in 2004 that was developed by Jason Huggins when he was testing an internal application at Thought Works. He developed a JavaScript library that could drive interactions with the page, allowing him to automatically rerun tests against multiple browsers. Selenium RC (aka. Selenium 1) was ground-breaking because no other product allowed you to control a browser from a language of your choice.
Selenium was not adopted on a large scale for quite some time until Google put its weight behind the selenium project. Google had long been a heavy user of Selenium. Being a champion on open source technologies it is apt the Google uses Selenium for its test automation. In 2006 an engineer at Google named Simon Stewart started work on a project he called WebDriver (aka. Selenium 2). In 2008 Selenium and WebDriver merged.
Selenium is possibly the most widely-used open source solution. For companies whose entire infrastructure is built on the World Wide Web it makes sense to use Selenium for all web automation needs. Companies who are dependent on legacy technologies like PowerBuilder and Mainframes will never be able to appreciate Selenium because selenium works only with web applications.




Programming Language 


Or should I say the Programming Languages supported by Selenium are
v  C# (Dot Net)
v  Java
v  Perl
v  Ruby
v  Python
v  PHP
The real beauty of Selenium is that you can pick the language you are comfortable with and start using that as your primary scripting language.





Cross Platform Testing 


Selenium deploys on the following operating systems
v  Windows
v  Linux
v  Solaris
v  OS X

I was able to execute the scripts created on a windows machine on a machine running Ubuntu. Not many commercial tools can claim that





Cross browser testing 


 Perhaps the biggest selling point of Selenium has to be Cross browser testing capability. Although the Selenium IDE is a Firefox extension only, Scripts can be executed on the following browsers
v  Internet Explorer
v  Firefox
v  Opera
v  Chrome
v  Safari
v  Android and iphone browsers
I was able to execute the same scripts on IE, Firefox and Chrome. Imagine the smile on my face when I did thatJ. Not many testers can claim that!!!

Others advantages -
v  Multiple Selenium tests can be run concurrently on any number of local or remote systems, thus minimizing test execution time.
v  Mobile application testing is also possible using selenium although I have never had a chance to do that.




Selenium components 


Selenium comprises of the following three components
v  Selenium IDE
v  Selenium Remote Control / WebDriver
v  Selenium Grid

Selenium IDE
v  Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is implemented as a Firefox extension
v  Selenium IDE is the a Firefox plug-in that does record-and-playback of interactions with the browser
v  Allows recording, editing, and debugging tests

Selenium Remote Control / Selenium WebDriver
v  Selenium Remote Control (RC) is a server, written in Java, which accepts commands for the browser via HTTP. Selenium Remote Control has been officially deprecated
v  Selenium WebDriver is the successor to Selenium RC. Selenium WebDriver accepts commands (sent in Selenese, or via a Client API) and sends them to a browser



Architectural Representation
Testing Framework



You can use either TESTNG or JUNIT I leave that choice to you. I started off my initial selenium endeavor with JUNIT but ended up with TESTNG

Reporting

  

All the software automation tools are judged by the depth and the quality of report the tool can generate and selenium is no exception. In our case we started with the native TESTNG reporting and later moved to customized Notepad reporting. Not content with notepad report we explored excel reporting also and succeeded. Our ambitions slightly increased and we started generating HTML reporting. Did we stop there? No way! We also created PDF report. Like in other tools we can take screen prints of failed or passed scenarios, send out emails with the results and screen prints to all the stake holders.

Hope you like this post..
If you like Hit a facebook like button.


12 comments:

  1. Nice info. Yes, Selenium is one of the best web automation tools among all.

    ReplyDelete
  2. The blog gave me idea about the selenium and and it features more over the components of selenium are explained in an effective manner thanks for sharing it
    Selenium Training in Chennai

    ReplyDelete
  3. Hello,
    The Article on Selenium Web automation tool is nice Give detail information about it .Thanks for Sharing the information
    mobile application testing

    ReplyDelete
  4. Great article about Web Automation Tools. Thanks for sharing it.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. I would like to say thank you for the amazing details and concepts you are sharing in this.The style of writing is excellent and also the content is top-notch. Thanks for that shrewdness you provide the readers!

    PHP Training
    Azure Training
    Cloud Training

    ReplyDelete
  7. Much obliged for sharing this brilliant substance. its extremely fascinating. Numerous web journals I see these days don't actually give whatever pulls in others however the manner in which you have plainly clarified everything it's truly awesome. There are loads of posts But your method of Writing is so Good and Knowledgeable. continue to post such helpful data and view my site too...
    the arrow paper airplane
    paper airplane fighter
    smart fly

    ReplyDelete