Introduction to
Selenium
What is Selenium?
Selenium is open source Tool which helps
to Automate Web applications Selenium is a
portable software
testing framework for web
applications. Selenium provides a record/playback tool for authoring tests without
learning a test scripting language (Selenium IDE)
Who developed Selenium?
Since Selenium is a collection of
different tools, it had different developers as well. Below are the key persons
who made notable contributions to the Selenium Project
Selenium Web Driver
Selenium Web Driver is the successor
to Selenium RC. Selenium WebDriver accepts commands (sent in Selenese, or via a
Client API) and sends them to a browser. This is implemented through a
browser-specific browser driver, which sends commands to a browser,
and retrieves results. Most browser drivers actually launch and access a
browser application (such as Firefox or Internet Explorer); there is also an HtmlUnit browser driver, which simulates
a browser using HtmlUnit.
Unlike in Selenium 1, where the
Selenium server was necessary to run tests, Selenium WebDriver does not need a
special server to execute tests. Instead, the WebDriver directly starts a
browser instance and controls it. However, Selenium Grid can be used with
WebDriver to execute tests on remote systems (see below).
In practice, this means that the
Selenium 2.0 API has significantly fewer calls than does the Selenium 1.0 API.
Where Selenium 1.0 attempted to provide a rich interface for many different
browser operations, Selenium 2.0 aims to provide a basic set of building blocks
from which developers can create their own Domain Specific
Language. One such DSL already exists: the Watir project
in the Ruby language has a rich history of good design. Watir-webdriver
implements the Watir API as a wrapper for Selenium-Webdriver in Ruby.
Watir-webdriver is created entirely automatically, based on the WebDriver
specification and the HTML specification.
As of early 2012, Simon Stewart
(inventor of WebDriver), who was then with Google and now with Facebook, and
David Burns of Mozilla were negotiating with theW3C to
make WebDriver an internet standard. In July 2012, the working draft was
released.[9] As such, Selenium-Webdriver
(Selenium 2.0) aims to be the reference implementation of the WebDriver
standard in various programming languages. Currently Selenium-WebDriver is
fully implemented and supported inPython, Ruby, Java,
and C#.
Some important Advantages and Differences
of QTP and Selenium Web driver
Selenium
QTP
Open source, free to use,
and free of charge.
Commercial.
Highly extensible
Limited add-ons
Can run tests across different browsers
Can only run tests in Firefox , Internet
Explorerand Chrome
Supports various operating systems
Can only be used in Windows
Supports mobile devices
Supports mobile device using 3rd party software
Can execute tests while the browser is
minimized
Needs to have the application under test to be visible on the desktop
Can execute tests in parallel.
Can only execute in parallel but using Quality Center which is again a
paid product.
Advantages of QTP over Selenium
QTP
Selenium
Can test both web and desktop applications
Can only test web applications
Comes with a built-in object repository
Has no built-in object repository
Automates faster than Seleniumbecause it is a fully featured IDE.
Automates at a slower rate because it does not have a native IDE and
only third party IDE can be used for development
Data-driven testing is easier to perform because it has
built-in global and local data tables.
Data-driven testing is more cumbersome since you have to rely on the
programming language's capabilities for setting values for your test data
Can access controls within the browser(such as the Favorites bar, Address bar, Back and
Forward buttons, etc.)
Cannot access elements outside of the web application under test
Provides professional customer support
No official user support is being offered.
Has native capability to export test datainto external
formats
Has no native capability to export runtime data onto external formats
Parameterization Support is in built
Parameterization can be done via programming but is difficult to
implement.
Test Reports are generated automatically
No native support to generate test /bug reports.
Selenium
|
QTP
|
Open source, free to use,
and free of charge.
|
Commercial.
|
Highly extensible
|
Limited add-ons
|
Can run tests across different browsers
|
Can only run tests in Firefox , Internet
Explorerand Chrome
|
Supports various operating systems
|
Can only be used in Windows
|
Supports mobile devices
|
Supports mobile device using 3rd party software
|
Can execute tests while the browser is
minimized
|
Needs to have the application under test to be visible on the desktop
|
Can execute tests in parallel.
|
Can only execute in parallel but using Quality Center which is again a
paid product.
|
QTP
|
Selenium
|
Can test both web and desktop applications
|
Can only test web applications
|
Comes with a built-in object repository
|
Has no built-in object repository
|
Automates faster than Seleniumbecause it is a fully featured IDE.
|
Automates at a slower rate because it does not have a native IDE and
only third party IDE can be used for development
|
Data-driven testing is easier to perform because it has
built-in global and local data tables.
|
Data-driven testing is more cumbersome since you have to rely on the
programming language's capabilities for setting values for your test data
|
Can access controls within the browser(such as the Favorites bar, Address bar, Back and
Forward buttons, etc.)
|
Cannot access elements outside of the web application under test
|
Provides professional customer support
|
No official user support is being offered.
|
Has native capability to export test datainto external
formats
|
Has no native capability to export runtime data onto external formats
|
Parameterization Support is in built
|
Parameterization can be done via programming but is difficult to
implement.
|
Test Reports are generated automatically
|
No native support to generate test /bug reports.
|
No comments:
Post a Comment