Selenium

Page 1

selenium


CONTENT : • • • • • • • •

What Is Selenium ? Advantages of selenium Disadvantages of selenium Types of Testing Selenium Web Driver Selenium Grid Selenium IDE Types of Testing Automated with Selenium


WHAT IS SELENIUM ? • Selenium is an open-source tool that automates web browsers. It provides a single interface that lets you write test scripts in programming languages like Ruby, Java, Node JS, PHP, Perl, Python, and C#, among others. • We can neither test any desktop (software) application nor test any mobile application using Selenium.


Advantages of selenium • Test scripts can be written in any of these programming languages: Java, Python, C#, PHP, Ruby, Perl & .Net • Tests can be carried out in any of these OS: Windows, Mac or Linux • Tests can be carried out using any browser: Mozilla Firefox, Internet Explorer, Google Chrome, Safari or Opera • Selenium is open-source, there is no licensing cost involved,


Disadvantages of selenium • We can use Selenium only to test web applications. We cannot test desktop applications or any other software • There is no guaranteed support available for Selenium. We need to leverage on the available customer communities • It is not possible to perform testing on images. We need to integrate Selenium with Sikuli for image based testing • There is no native reporting facility. But we can overcome that issue by integrating it with frameworks like TestNG or JUnit


Types of testing : Automated Testing

Manual testing

• Faster • Needs less investment in humans • It is not prone to errors • Frequent execution of tests is possible

• Slower • Needs more investment in humans • Prone to errors • Execution of tests are not frequent.


Selenium WebDriver

WebDriver executes test scripts through browser-specific drivers. It consists of: • API • Library • Driver • Framework


Selenium Grid

The Grid can minimize test runtime–by executing multiple test scripts on any number of remote devices at once. This is called parallel testing. The two main components needed for this are:  Hub (server):

Accepts access requests from WebDriver client. Routes JSON test commands to remote drivers on registered ‘nodes’.  Node (remote device):

Contains a native OS, browsers, and remote WebDriver.


Selenium IDE

Selenium IDE is a Chrome and Firefox plugin that can log ‘natural’ interactions in the browser and generate its code in programming languages like C#, Java, Python, and Ruby, as well as Selenese (Selenium’s own scripting language). Shortcomings of IDE are: • Plug-in only available for Mozilla Firefox; not for other browsers • It is not possible to test dynamic web applications; only simple tests can be recorded • Test cases cannot be scripted using programming logic • Does not support Data Driven testing.


Types of Testing Automated with Selenium : Compatibility Testing:

Done by QA professionals/Testers to ensure that the web app meets performance benchmarks on different browser-OS combinations Performance Testing:

Series of tests done by QA professionals/Testers to ensure that the project meets performance benchmarks set by the stakeholders. Integration Testing:

Done by developers to verify that units/modules coded separately (that work on their own), also work when put together.


System Testing: aka Black Box testing. Done by Testers/QA professionals with no context of the code or any previously executed tests. Typically centered on a single user workflow .. End-to-end Testing: Also done by Testers/QA professionals, typically from the user’s point of view. The aim is to verify that all touchpoints on the web app are functional. Regression Testing:

A series of tests done to ensure that newly built features work with the existing system Well-written test suites can also automate Smoke and Sanity testing with selenium .


TH

K N A

U YO

For more information- CLICK HERE.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.