Introduction to Selenium

Introduction to Selenium

1) Introduction to Selenium
2) History of the Selenium Project
3) Selenium Components / Selenium's Tool Suite
4) Platforms supported by Selenium
5) Selenium License
6) Testing Frameworks and other Tools used in selenium
7) Advantages of Selenium
8) Disadvantages of Selenium
9) Selenium versus UFT (formerly QTP)
10) Selenium Environment Setup
-------------------------------------------------------
1) Introduction to Selenium

> Selenium is mainly used for Functional and Regression Testing

> Selenium is an Open Source Software 

> Selenium is a suite of Software Tools to automate Web Browsers.

> Selenium supports various operating environments.

MS Windows

Linux

Macintosh etc...

> Selenium supports various Browsers

Mozilla Firefox

Google Chrome

IE

Safari

Opera Etc...
---------------------
Note: Selenium IDE supports Mozilla Firefox browser only.

> Selenium supports various programming languages to write programs (Test Scripts).

Java

C#

Python

Perl

Ruby

PHP
-------------------------------------------------------
2) History of the Selenium Project

> Selenium first came to life in 2004.

> In 2006, Selenium WebDriver was launched at Google.

> In 2008, the whole Selenium team decided to merge Selenium WebDriver with selenium RC
in order to form more powerful tool called Selenium 2.0

Selenium 1.0
(Selenium IDE + Selenium RC + Selenium Grid)

Selenium 2.0
(Selenium IDE + Selenium RC + Selenium WebDriver + Selenium Grid)

Selenium 3.0 Coming
-------------------------------------------------------
3) Selenium’s Tool suite / Selenium Components 

i) Selenium IDE
ii) Selenium RC (*Out Dated)
iii) Selenium WebDriver
iv) Selenium Grid

i) Selenium IDE (Integrated Development Environment)

It is a Firefox Browser Add on, used to create and execute Test cases.

Selenium IDE features:

> Create Test Cases, Test Suites
(Record or Type Test Steps)

> Edit Cases

> Execute Test Cases, Test suites

> Debug Test Cases

> Enhance Test Cases

> Export Test Cases to other formats (java, ruby etc...)

Note: Selenium IDE Test Case default format is .html
--------------------------------------------------------------
Drawbacks of Selenium IDE

> It works on Mozilla Firefox Browser only.

> It doesn't support programming logic/features to enhance Test Cases

> It doesn't support Data Driven Testing

> It is not suitable for complex Test case design

> No centralized maintenance of Elements / objects
------------------------------------
ii) Selenium RC (* Out Dated)
-----------------------------------
iii) Selenium WebDriver

> Selenium WebDriver is a Programming Interface (No IDE) to create and execute Test Cases.

Selenium WebDriver - Programming Interface, no IDE
Selenium IDE - IDE but no Programming interface
UFT/QTP - IDE as well as Programming Interface
-----------------------------------------------------------
Selenium WebDriver supports various programming languages

Java

C#

Python

Perl

PHP

Ruby
--------------------------------------------------------
Selenium WebDriver Supports various browsers

Mozilla Firefox

Google Chrome

IE

Safari

Opera Etc...
-----------------------------------------------
Selenium Supports various operating environments

MS Windows

Linux

Macintose Etc...
--------------------------------------------------------------
Drawbacks of Selenium WebDriver

> No built-in Result Reporting facility

> Selenium WebDriver has no IDE, takes more time to create Test Cases.

> It doesn't have an integrated spread sheet for Data driven testing
-----------------------------------
iv) Selenium Grid

> Selenium Grid Executes Test cases across multiple browsers, operating environments
and machines in Parallel

> Selenium Grid 2.0 supports Selenium RC Test Cases and Selenium WebDriver Test Cases.
-----------------------------------
You Focus on:

Test Automation using Selenium

i) Selenium WebDriver
(To create and execute Test Cases using Element Locators and WebDriver API Commands)

ii) Java programming
(To enhance Test cases)

iii) TestNG Testing Framework
(To group Test cases, execute Test batches and generate Test Reports.
-------------------------------------------------------
4) Platforms Supported by Selenium

a) Browsers
--------------
Google Chrome
Mozilla Firefox
IE
Opera
Safari etc...

b) Operating Systems
------------------------
MS Windows
Linux
Macintosh etc...

c) Programming Languages
------------------------------
Java
C#
Python
Perl
Ruby
PHP

d) Application Environment
------------------------------
Computer Software and Mobile Software

Computer Software

CUI based Application
1) Desktop Applications - No
2) Web Applications - Yes
Hybrid Application

Mobile Software
1) Native Application - No
2) Web Apps - Yes
3) Hybrid Applications -No
-------------------------------------------------------
5) Selenium License

All Selenium Projects released under the Apache 2.0 License

> Anybody can download and use all Selenium Projects / Components with free of cost
> Anybody can modify the source code and distribute the source code.

** Selling modified code is not allowed.
--------------------------------------------------------------
6) Testing Frameworks and other Tools used in Selenium

Testing Frameworks

Java Platform
i) JUnit
ii) TestNG - To group Test cases, Execute Test Batches, and Generate Reports

.NET
NUnit
----------------------------------------
Eclipse IDE - To write and execute Java Programs

Firebug and Firpath plug ins for Mozilla Firefox browser to inspect elements
(Page Inspector built-in feature also there in Firefox browser)

For Google Chrome, IE browsers, built-in developer tools available
-------------------------------
Identifying Elements and performing operations on Elements
-----------------------------------------------------------
Browser Drivers
Mozilla Firefox is default browser

For Chrome, IE etc... browsers, need to download browser drivers and set path.
-------------------------------------------------------
7) Advantages of Selenium

i) Selenium is an Open Source Software Tools Suite

ii) Selenium supports various Browsers (Firefox, Chrome, IE, Safari, Opera etc...)

iii) Selenium supports various Programming languages (Java/Python/C#/Perl/Ruby/PHP)

iv) Selenium supports various operating environments (MS Windows, Linux, Mac etc...)

v) Selenium supports Parallel Testing

vi) Selenium uses less Hardware resources.
-------------------------------------------------------
8) Disadvantages of Selenium

i) Selenium supports Web Applications / Browser based Applications only.

ii) No reliable Technical support from anybody.

iii) Difficult to use, takes more time to create Test cases.
----------------
Create Tests

UFT

Record / Descriptive programming to create basic steps
Use Checkpoints / VBScript Flow control; statements to insert verification points
Use Data Table / Use VBScript Flow control and Excel Object for Data driven Testing
Write Comments

Selenium

Selenium IDE
Record / Type steps to create basic steps
Use Selenese Commands (Assert/Verify commands)
No support
Write Comments

Selenium WebDriver
Write Test Steps using Element Locators and WebDriver Commands / Methods
Use Programming logic / Flow Control or Testing Framework Assert methods
Use Programming features (Text file, Excel etc...) 
Write Comments
---------------------
iv) Difficult setup Test Environment

If It is UFT, Download and Install 

If It is Selenium WebDriver, Download Java, Selenium WebDriver Java Language Binding, and Download JUnit or TestNG Framework and Configure all...
-----------------------
v) Limited support for Image Testing

vi) New features may not work properly

vii) No other tool integration for Test management

viii) No built in Result Reporting facility
-------------------------------------------------------
9) Selenium versus UFT (formerly QTP)

Selenium:

i) Selenium Open Source
ii) Selenium Doesn't support Desktop Applications
iii) Supports various Programming Environments
iv) Supports Parallel Testing
v) Supports various operating Environments
vi) No IDE in Selenium WebDriver
vii) Less Technical support
viii) New features may not work properly
ix) Difficult to Setup Test Environment
x) No other tool integration for Test Management
xi) Selenium Uses less hardware resources
xii) Difficult use, takes more time to create Test cases
xiii) No built-in Reporting facility
xiv) No Authorized Certification

UFT (Formerly QTP):

i) UFT is Commercial / Vendor Tool
ii) UFT Supports Desktop Applications and Web Applications
iii) UFT Supports VBScript only
iv) UFT Doesn't support Parallel Testing
v) UFT Supports MS Windows only
vi) UFT has IDE as well as Programming Interface
vii) HP provides Technical support
viii) UFT new features will workproperly.
ix) Easy to Setup Test Environment
x) UFT can Integrate with ALM/QC
xi) UFT Uses more hardware resources
xii) Easy to create Tests using UFT
xiii) UFT has Built in Reporting facility
xiv) HP Conducts Certification Program
-------------------------------------------------------
10) Selenium Test Environment Setup

Choose Selenium Tools and Others

Eclipse IDE to write and execute programs
Java as Programming
Selenium WebDriver to Create Test Cases
TestNG Testing Framework as Test Runner
Browser drivers also
.................
----------------------------------------
Configure Selenium

> Download Eclipse IDE and Extract
> Download Java Software and Install
> Download Selenium WebDriver Java Language binding (seleniumhq.org) and       Add WebDriver jar files to Java Project in Eclipse IDE
> Download Chrome, IE etc... Browser Drivers to execute Test Cases against all     popular browsers
> Download and Install TestNG Framework form Eclipse IDE
-------------------------------------------------------

0 comments:

Post a Comment