Monday, September 9, 2019

Post#3.Selenium Introduction


Selenium Introduction

Selenium is an open source tool used for test automation. It is mainly used for automates browsers across different platforms.  (i.e. automating web application). Selenium has the support of some of the largest browser vendors who have taken steps to make Selenium a native part of their browser.
Selenium is a suite of tools:
1.   Selenium 2.0 (WebDriver): It is the current product being used in industries. It has become more powerful and robust automation tool. Selenium 2 still runs Selenium 1’s Selenium RC interface for backwards compatibility.
2.   Selenium 1.0 (Selenium RC or Remote Control): Selenium RC was the main tool used for automation before WebDriver came into picture. Now, It is deprecated and mostly used in maintenance projects.
3.   Selenium IDE: Selenium IDE (Integrated Development Environment) is a Firefox plugin and has capability of record and playback the activity performed on any web Application.
4.   Selenium GRID: It is used to run the multiple test parallels. It can run the test on different browser and different remote machines.

Selenium Pros

·      Selenium has no upfront, out-of-pocket costs. It is a free download and support is free too, although it is community-based.
·      Selenium tests are, in principle, able to run under multiple browsers.
·      Although Selenium has its own script language, you are not limited to writing in that language since it can work with language bindings to support whatever your developers/testers are comfortable with including C#, Java, JavaScript, PHP, Python and others.
·      Selenium scripts are created by recording actions using the web application under test running in a browser. These scripts can be saved and re-run at any time. Selenium tests can be created manually through the use of web development tools such as Firebug also.
·      Selenium does not restrict QA’s choice of reporting tools, build systems or any other aspect of their testing framework. It integrates well with popular tools such as Hudson, SauceLabs, Selenium-Grid, QMetry and others.
·      It also supports web applications that implement part of their functionality within the browser using JavaScript and AJAX technologies.
Because of its many advantages, Selenium finds wide usage for UI, regression, unit and acceptance testing. Because of the rapid test development it enables, it is quite popular for quick-cycle development methodologies such as Agile or Extreme Programming. Selenium is also popular with IT staff who automate repetitive, web-based administrative tasks.
Selenium Cons

·   Selenium is not a complete, comprehensive solution to fully automating the testing of web applications. It requires third-party frameworks, language bindings and so on to be truly effective.
·   Despite its acceptance of other test script languages, it demands higher-level technical skills, such as programming, from QA team members.
·   It has no test management facilities. Test scripts are saved as simple files without attributes. Organizing individual scripts in any fashion via a user interface requires a third-party tool or a custom application.
·   Because native “Selenese” test scripts are not user-friendly in terms of readability, they are difficult to modify. Many testers simply resort to discarding the original scripts and recording them again, which can be time consuming.
·   Selenium does not support test and result sharing in anything but a manual way.
·   There is no support for running tests in parallel on a single computer.
·   Selenium has technical issues with browsers other than Firefox. Furthermore, it does not support conditionals, loops and has trouble finding locators without the help of additional tools such as Firebug.
A final drawback to Selenium, which has nothing to do with Selenium itself, is that it enables over-reliance by testers for testing software layers below the GUI, since test scripts are relatively quick to produce. However, such an inversion of the traditional testing pyramid, especially in end-to-end automated testing environments has serious efficiency and test maintenance issues.
The advantages of Selenium for increasing the efficiency of web application testing at the GUI level outweigh its disadvantages, especially with regard to cost and the shortening of test cycles due to efficient automated test generation. If your organization is willing to tackle the technical and test management issues, Selenium is an excellent tool suite with which to improve the quality of web-based testing.
Differences between selenium and other Tools

Without a doubt, the most dominant commercial player in the market when it comes to functional automation is QTP/UFT. So it’s legitimate to compare Selenium with QTP/UFT.
Comparison Matrix:
Feature
QTP(UFT)
Selenium
Environment Support
Only Windows
Windows , Linux , Solaris
OS X , Others (If brower & JVM or
Javascript support exists)
Windows (Non-browser)
based Application support
Yes
No
Browser support
Google Chrome (uptill ver 23)
Internet Explorer , Firefox ( ver 21)
Google Chrome , Internet Explorer ,
Firefox , Opera , HtmlUnit
Language Support
VB Script
Java, C#, Ruby, Python, Perl
PHP , Javascript
 Mobile (Phones & Tablets)
support
 Different commercial product i.e.
HP UFT Mobile (formerly known as
MobileCloud for QTP)
 Android , iPhone & iPad ,
Blackberry , Headless WebKit
 Framework
 Easily integrated with HP Quality
Center or HP ALM (separate
commercial products)
 Selenium + Eclipse + Maven / ANT
+ Jenkins / Hudson & its plugins /
Cruise Control + TestNG + SVN
 Continuous Integration
 Possible through Quality Center
/ ALM or Jenkins
 Possible through Jenkins / Hudson
/ Cruise Control
 Object Recognition
/ Storage
 Inbuilt Object Repository (storing
Element Id, multiple attributes) along
with weightage that gives flexibility
on deviation acceptance in control
recognition
UI Maps and different object location
strategy such as -XPath Element ID
or attribute DOM
 Image based Tests
 Easily possible
 Possible but not easy
 Reports
 Quality Center has in-built awesome
dashboards
Integration with Jenkins can give
good reporting & dashboard
capabilities
 Software Cost
 License & Annual maintenance
fees
 Zero
 Coding Experience of
Engineer
 Not Much
Should be very good along with
technical capabilities of integrating
different pieces of framework
 Script Creation Time
 Less
 High
Hardware resource (CPU
+ RAM) consumption during
script execution
High
 Low
Product Support
Dedicate HP support along with
support forums
Open Source Community


No comments:

Post a Comment