Selenium Overview

Selenium is an automation test tool, it is mainly used to test web applications, it is open source and free. With this tool, test cases can be run directly in web browsers just like a real human being operate the web browsers. It support a lot of web browsers(chrome, Firefox, IE, opera, safari, etc). There also has a lot of different sub tools to support different automation test approach.

Users can use a lot of main programming language (java, python, php, Javascript, c#…etc) to write test case script in selenium. Then run the script to verify test cases in most main web browsers. Not only those automation test scripts can be run in windows, linux, mac, but also it support mobile os like android, ios and windows mobile.

This test tool for functional test is recognized as the most portable test framework in all open source test tools especially for web application automation.

Automation Tool Suite

There has four tools in this automation tool suite, each for a special test requirement.

selenium tool suite relation diagram

  1. Selenium Integrated Development Environment( IDE ):
    selenium-ide-architechure
    As a Firefox plugin, selenium IDE can be used to create test script prototype quickly and easily. It can record human tester actions as a script (in any programming language) while tester run the test case manually. The recorded test script can be executed later for regression test automatically. This tool can access browser’s DOM (Document Object Module) elements use Javascript. It also provide flexible interface for testers to create or update test cases.
  2. Selenium Remote Control (RC):
    selenium remote control diagram
    Selenium RC is the main feature in selenium 1. Tester can use it to simulate user actions (such as click button, submit form, input data in text box) in web browsers. When web browser is loaded in test script, it injects a suite of Javascript into it. Then use these Javascripts to interact with the web browser.
  3. Typical usage for RC:
    1) Tester write test case script with supported programming language api.
    2) When test script is running, it open a web browser and injects selenium core which is just a suite of Javascripts, then use these Javascripts to execute command.
    3) Test script send command to RC server.
    4) RC server receive these command and trigger selenium core to execute the commands and interact with browser page web elements.
  4. Webdriver:
    selenium-webdriver-architecture
    Webdriver is the main new feature added in selenium 2. Webdriver aimed to deliver easy and helpful programming interface to resolve limitations of Selenium RC programming api. Different from RC, webdriver use browser native support to interact with web pages. So different browser has different webdriver driver library and different features. All these is decided by the web browser that run the test cases. The implementation of webdriver is highly related to the web browser. So there has following webdriver drivers.1) HttpUnit Driver: The fastest and  lightest webdriver implementation. Based on HttpUnit, it can be run cross windows, Linux, mac because of it’s pure java implementation.2) Firefox Driver: Easiest to configure and use.  Used to run test scripts in Firefox web browser. Do not need extra configuration to use.
    3) Chrome Driver:  Used to run test script in google chrome web browser, need more configuration to use.4) Internet Explorer Driver: Used to run test script in internet explorer web browser, need more configuration to use. Can only run in windows os, slower than Firefox and chrome web driver.
  5. Selenium Grid:
    selenium grid architecture
    With this feature, test scripts can be run on multiple machines at the same time. This can reduce total test scripts run time. This can also make bug finding more quickly because the test cases run quickly. This is suitable for big software with too many test scripts to run. We can also choose to test different web browsers on different machines. You can configure browser version, os and machine to run the test case by using selenium RC’s Capabilities.
(Visited 210 times, 1 visits today)
READ :   How to use selenium IDE to record test case script

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.