3. Agenda
What is selenium & why?
Selenium Components
Advantages of Selenium
Automating Tests using Selenium
Benefits to the Organization
Limitations
Conclusion
4. Test Automation
Automation
The process of converting manual test cases to test scripts by
using automation tools is called as automation
The test scripts can be executed on the targeted application
whenever required.
Advantages
Saves time by executing the script without any manual effort
We can reduce the cost to the company
Test scripts are repeatable
Bugs can be identified and accuracy maintained
Test report will be generated by the tool and we can ensure
quality
5. What is Selenium?
Selenium is a robust set of tools that supports rapid development
of test automation for web-based applications
Open source
Used for functional regression testing
Uses JavaScript
Embeds test automation engine in your browser
Hooks for many other languages - Java, Ruby, Python
Selenium operations are highly flexible & Extendable
7. Selenium Components
Selenium IDE
Integrated Development Environment is for record and run the
script.
It is an add on for Firefox
It is accountable for user’s actions
The recorded script can be viewed in all the supported
languages
The Recorded scripts can be run against other browsers with the
help of RC or Web Driver
8. Selenium Components
Selenium RC
RC: Remote Control
It is server and it launches all the brewers but one browser at a
time
It acts as API and Library
It is Responsible for the Entire automation
It is also known as selenium1
9. Selenium Components
Selenium Web Driver
The advanced version of selenium RC is known as selenium
web Driver.
The combination of the RC and Web Driver is called as
Selenium2.0
Selenium Grid
Grid is for parallel Execution
We can launch all supported browsers parallel and script can be
executed on the targeted browsers parallel
10. Selenium Frameworks
Definition
Frameworks is a combination of classes, Methods, API’s, Libraries
these all combined together to work on one application
effectively
Modular Frameworks
Data Driven Frameworks
Keyword Driver Frameworks
Junit
TestNG
Hybrid Frameworks
11. Selenium Frameworks
Modular Frameworks
It is basic framework and also linear framework
The automation engineer’s will divide the application into
modules and sub modules
They will develop the scripts for all the modules
The scripts are stable they will integrate all the scripts in a
hierarchical order to execute
12. Selenium Frameworks
Data Driven Framework
Introduced external files like excel, txt, XML, Database etc.. To
take input data as well as to give output result
It contains the driver script it is responsible for execution
Driver script doesn’t contain any of test cases or test data all
the test data and test cases will be available in external file
The driver script will take the data from external file and
executes hence we call it as data driven framework
13. Selenium Frameworks
Keyword Driven Frameworks
Keyword means step and it is a step by step execution
It is very similar to manual testing, so test scripts are similar in
the Keyword Driven Framework
Types of Keyword Driven Frameworks
Junit
It is java unit testing framework, the main purpose of junit is to
develop the script in java programming language and to
execute the scripts once execution is done it auto generates
the report result
14. Selenium Frameworks
TestNG
It is testing framework and developed on top of junit they over
come all the limitations of Junit in TestNG and introduced some
new functionality
TestNG is add on for eclipse
Hybrid Frameworks
The combination of any two or more frameworks is nothing but
Hybrid Framework
15. Prerequisites
Software
Selenium IDE, Mozilla Firefox for script recording
Selenium Server, Java for running scripts, sikuli
Configuration
Set path variables
Use –multi Window option while starting server
Resource
Users… should have basic scripting knowledge
Hardware… No specific requirement the basic configuration for a
server – P4, 512 MB RAM is good enough.
16. Features
Open source, free software
Allows scripting in several languages like Java, C#, PHP and
Python.
Assertion statements provide an efficient way of comparing
expected and actual results.
Inbuilt reporting mechanism.
Easy Installation
Scripting Techniques :
Easy recording and playback of scripts
Compatibility :
Multiple operating systems (Windows, Linux, Mac)
Allows cross browser testing
Integration with third party tools.
17. Benefits to the Organization
Automation Benefits
Usual benefits for automation e.g. Time saving
Time required for sanity reduced ( 12 man hours to 3 man hours,
build frequency of 4-5 builds a month )
For one of the projects, Sanity suite automated : 243 test cases
Good Returns on Zero Investment
Increasing Productivity
Cost saving as it is open-source
QA engineers get familiar with scripting languages like Ruby,
Perl etc apart from manual testing
Caveat
Full automation and maintenance has not been evaluated and
that can be a risk
18. Selenium Best Practices
Automation Benefits
Usual benefits for automation e.g. Time saving
Time required for sanity reduced ( 12 man hours to 3 man hours,
build frequency of 4-5 builds a month )
For one of the projects, Sanity suite automated : 243 test cases
Good Returns on Zero Investment
Increasing Productivity
Cost saving as it is open-source
QA engineers get familiar with scripting languages like Ruby,
Perl etc apart from manual testing
Caveat
Full automation and maintenance has not been evaluated and
that can be a risk
19. Limitations
It does not support and Desktop applications
Its and open source tool so in case of any technical issues you
need to rely on the selenium community forums to get your issue
resolved.
You need to know at least one of the supported language very
well in order to automate your application successfully.
No inbuilt reporting capability so you need plugins like JUnit and
TestNG for test reports
Lack of exhaustive formal guidance material
Note: Selenium Support Desktop applications using Sikuli.