What is Automation
Testing?
Automation testing is a type of software testing that involves automated test case execution
using an automation tool.
WHAT IS AUTOMATION TESTING
Slide title
Performing testing on the software application / product
with the help of automation tools is called Automation
testing.
Automation Testing is a software testing technique
that performs using special automated testing
software tools to execute a test case suite. On the
contrary, Manual Testing is performed by a human
sitting in front of a computer carefully executing the
test steps.
Note:
In both manual and automation, we are performing same
testing but the way we are performing testing is different 2
from manual to automation.
Why Test Automation?
Slide title
Test Automation is the best way to increase the
effectiveness, test coverage, and execution speed in software
testing. Automated software testing is important due to the
following reasons:
• Manual Testing of all workflows, all fields, all negative
scenarios is time consuming
• It is difficult to test for multilingual sites manually
• Test Automation in software testing does not require
Human intervention. You can run automated test
unattended (overnight)
• Test Automation increases the speed of test execution
• Automation helps increase Test Coverage
• Manual Testing can become boring and hence error-prone.
3
Slide title
Automation tools are divided into 3 types:
1. Functional testing tools
2. API testing tools
3. Performance tools
4
Functional Testing Tools
A tool which we are using to test the functionality of the application is called
functional testing tool.
Example: Selenium, QTP (Quick Test Professional), UFT, RFT (Rational Functional
Tester)
API Testing Tools
A tool which we are using to test the backend (API) functionality of the
application is called API testing tool.
Example: Postman, Swagger, Rest assured etc.
Performance Testing Tools
A tool which we are using to test the performance of the application is called
performance tool.
Example: Load Runner, Jmeter, Silk Performer etc.
Advantages of Automation Testing
Automation Testing Process
“Diff between Manual Testing and
Automation Testing”
• Manual Testing is done manually by QA analyst (Human) whereas
Automation Testing is done with the use of script, code and automation tools
(computer) by a tester.
• Manual Testing process is not accurate because of the possibilities of human
errors whereas the Automation process is reliable because it is code and
script based.
• Manual Testing is a time-consuming process whereas Automation Testing is
very fast.
• Manual Testing is possible without programming knowledge whereas
Automation Testing is not possible without programming knowledge.
• Manual Testing allows random Testing whereas Automation Testing doesn’t
allow random Testing.
Disadvantages of Automation Testing
1. License cost of the automation tools. (To perform manual testing we need not
to pay any licence but for performing automation testing we need to first
purchase the licence of tool)
2. Some automation tools will not support some technologies. But manual tester
can able to test any application which has developed in any technology.
3. To perform manual testing in a project we doesn’t required technical
knowledge but to perform automation testing we should required technical
knowledge (coding knowledge)
4. Without human element, it’s difficult to get insight into visual aspects of your
UI like colors, font, sizes, contrast or button sizes.
Note:
Comparatively disadvantages we have more advantages with Automation
Testing. That is the reason most of the clients prefer to implement automation
testing along with manual testing.
FAQ’s:
1. What is Automation Testing
2. What is the difference between Manual and Automation Testing
3. What are the different types of Automation Tools available in Industry
4. Which Test management tool you are using in current project
5. What is difference between Functional and Performance testing
6. What are advantages of Automation Testing?
7. Do we have any disadvantages in Automation Testing
SELENIUM
Selenium is the functional and regression testing
tool (Set of Tools) which is used to automate
functional and Regression Test case scenarios.
Selenium is one of the most widely used open
source Web UI (User Interface) automation testing
suite. That supports automation across different
browsers, platforms and programming languages.
Some of the Tools That are Available in The Markets
1.) Selenium
2.) QTP
3.) Appium
4.) Watir
5.) Testim
6.) Applitools
WHY SELENIUM? WHAT IS THE ADVANTAGE OF USING SELENIUM
OVER OTHER TESTING TOOL
What is Selenium?
Selenium is an Automation Tool developed by “Jason Huggins" in the year "2004"
Selenium is owned by google.
Characteristic of Selenium
1.) Its Support 14 Programming Language.
2.) Its Support 6 Multiple Browsers like Chrome, Firefox,
Safari,Opera,Edge,Internet Explore only 11 version.
3.) Its Support Web Based Applications.
4.) It is Free & Open Source.
Programming Language That are used in Market to Interact with slenium Top(5 Languages )?
1.) Java
2.) Python
3.) c#
4.) JavaScript
5.) Ruby
6.) Perl
7.) Dot Net
Advantages of Selenium
1.) It support 14 Programming Languages
2.) It is Free and Open Source
3.)Its Supports '6' Browsers
DrawBacks of Selenium
Its Supports only Web Based Applications( BY using Components Address )
Selenium Cannot Handle few things which are those?
1.) OTP
2.) CAPTCHA
3.) SUBTITLIES
4.)ANIMATIONS
Note : so we will use “[Link]” ( it will wait for 15 sec to handle the above
performance Before that we have to manually perform.)
TYPES OF SELENIUM VERSIONS
Types of Slenium Version and their Details
1.) Selenium Core : We are not able to execute multiple script at
one shot.
2.) Selenium IDE : Selenium IDE is a Record and Playback Tool.
1.) here we could record click action but mouse movement we
were not able to record.
1.) SELENIUM 2.) SELENIUM
2.) Selenium Ide is a plug in for the browsers CORE IDE
3.) Selenium IDE is a version.
3.) Selenium RC : Selenium RC in this we could execute
3.) SELENIUM
Multiple Script at one Shot & it was Supporting all the actions 4.) SELENIUM
RC ( REMOTE
WEBDRIVER
BUT, It could help us to automate only for Unauthorized CONTROL )
Websites(http) (ssl- Secured Socket Layer )
4.) Selenium WebDriver : We can execute Multiple Script at one
shot.
1.) We can Automate both http & https.
Drawbacks : We cannot automate OTP, SUB-TITLES,
Animations, Captcha.
Difference Between Selenium and QTP
Selenium QTP
1.) it is a free & Open Source 1.) QTP is Licenced Version
2.) QTP Supports 2 Programming Language 1.) Vb-Script 2.)
2.) Selenium Supports 14 programming Language Java
3. QTP Supports Only 2 Browsers 1.) Chrome 2.) Internet
3.) Selenium Supports '6' Browsers Explorer
4.) Selenium Suports only WebBased Application. 4.) QTP Supports all the 3 Platform
5.) Selenium Cannot Handle OTP, Captcha, Animation &
Subtitles 5.) QTP Can Handle OTP, Captcha, Animation & Subtitles.
What is Mobile Testing?
Testing Mobile Applications in order to find defect is called as Mobile Testing.
There are 2 types
1.) Manual 2.) Automation
what are the Types of Applications
1.) Hybrid Applications : If an application is developed for Multiple platform than such applications are called as Hybrid
Applications.
Example : Facebook, YouTube, Myntra
---------------------------------------------------------------------------------------------------
2.) Native Applications : If an application is developed for One Particular platform than such applications are called as Native
Applications.
Example : Calculator, Calendar, WhatsApp,
------------------------------------------------------------ --------------------------
3.) Web Based Applications : Any Application that can be accessed by Opening the browser & entering the url than it is called
as Web Based Application.
Example : [Link], [Link]
what are the Types of Applications
1.) Appium : Its Supports 14 programming Languages
a.) It is Free & Open Source.
b.) It is the only Automation Tool Which Support multiple Platforms
c.) It can automate all types of mobile Applications like Native, Hybrid &
web based
2.) Selenium and Robotium : They both supports only android Platform.
a.) They Both are free and Open source.
b.) Since only one platform is supported, we can automate only Native Apps
Selenium Architecture
Theory Explanations : Selenium Supports 14 Programming Languages. We will use any 1 prg
language i.e.. JAVA and write Test Scripts.
The Test Scripts can also be called as Client Code or Client Binding or Language Binding.
Using the Test Script We will interact with server (we will send the Request to server)
server will send the request and it will try to process but, it will not be able to complete the
request because browser is Standalone.
So.. in order to perform action on browser Selenium we will take the help of Drivers( Drivers
are the set of API which will help us to interact with the browsers.
Selenium server should interact with driver in JSON( java script object Notation)
If we don't communicate in JSON format then driver will not be able to help us to perform
the actions in the browsers.
To specify which browser to launch and where exactly the driver file is present, we will use a
statement called as [Link](key , Value)
Key : Key will specify which browser to Launch
Value : Will mention the Path of driver file
Selenium WebDriver Architecture
Client Code | Client
Binding | Language
Binding
Api Drivers Browsers
java Chrome Driver
Request in Binary Request in
Python Format “JSON” Format Gecko Driver Request
C# MS Edge Driver
Ruby Opera Driver
Response Selenium Response Response
Stand Alone
JavaScript Server Safari Driver Application
To Specify the Browser to Launch &
We Will Write a Test where Exactly the driver file is
Present,
Script For Example Drivers are a Set of API’S We will use a statement called as
Selenium Server Will Try to
YouTube Application. Process But it will not be able [Link](key,Value);
to complete the request Key : will Specify which Browser to
Actions : Because Browser is a Launch.
1.) Open the Browser Standalone. Selenium will not Value : will Mention the path of
Xml JSON Driver File.
Chrome support Standalone Application
2.) Enter the URL Selenium 4 version
[Link]
Webdriver driver=new
m/ ChromeDriver();
Explain Java Selenium Architeture
Theory Explanations :
Search Context is the Super Most Interface and it as 2 Abstract Method.
WebDriver is an Interface and it consist of 13 AM ( 11 am internally and 2 Externally which belongs to search
Context ).
Remote WebDriver is Called as implementation class it will provide implementation to all the methods of
WebDriver and we are achieving method over-riding form WebDriver to remote WebDriver.
Around 2000 class inherit the properties from remote WebDriver and 6 are browser specific class.
What is Browser Specific Class : A Class which is developed to support a specific browser is called as Browser
Specific Class.
IN this Architecture we are achieving java concepts like In-heritence, abstractions,Run-time Polymorphism,
method over-riding, upcasting.
Advantages of Upcasting in Java Selenium Architecture
Java Selenium Architecture is also called as ''Webdriver Architecture"
1.) The same 13 AM Methods of webdriver will support or will work for all the browsers.
2.) we can achieve abstraction ( here we are converting form class to interface. An interface is by default
abstract ).
3.) we are achieving run time polymorphism ( web driver interface is getting re-binded for different object
address.)
4.) we can optimize our frame work : (since webdriver methods support all the browser we can run our
framework on multiple platform quiet easily.)
5.) Parallel Execution or Cross browser testing.
JAVA SELENIUM ARCHITECTURE / WEBDRIVER ARCHITECTURE
I Search Context
2 Abstract Methods
extends
I WebDriver
11 AM + 2 AM
Upcasting
implements
extends extends
Opera Driver C Remote WebDriver internet explorer
C C
Around 2000 Class Inherits
extends extends extends extends
C Chrome Driver C Firefox Driver C Safari Driver C Edge Driver
Browser Specific Class
WebDriver driver=new ChromeDriver();
ABSTRACT METHOD CONCRETE METHOD
1 Declaration without body 1 Declaration & Body
2. Interface, Abstract Class 2. Abstract Class &
Concreate class
Note : Search Context is indirectly getting overriding in a Remote WebDriver.
a 13 ABSTRACT METHODS OF WEBDRIVER
ABSTRACT METHODS RETURN TYPE
1 CLOSE() VOID
2 QUIT() VOID
3 FINDELEMENT() WEBELEMENT
4 FINDELEMENTS() LIST<WEBELEMENT>
5 GET() VOID
6 GETTITLE() STRING
7 GETCURRENTURL() STRING
8 GETPAGESOURCE() STRING
9 GETWINDOWHANDLE() STRING
10 GETWINDOWHANDLES() SET<STRING>
11 MANAGE() OPTIONS
12 NAVIGATE() NAVIGATION
13 SWITCHTO() TARGET LOCATOR
Note : findElement() and findElements() methods both belongs to search Contexts
[Link]([Link](“input”)).sendKeys(“hello”);
Browser address Verify the address of the element Locators
HOW TO DOWNLOAD SELENIUM JARS AND BROWSERS DRIVERS
CLICK ON THIS LINK : NOT ABLE TO DOWNLOAD? CLICK ON THIS LINK TO DOWNLOAD ALL THE DOWNLOADED FILES DIRECTLY
To Launch a Multiple Browers with using WebDriver
public class LaunchBrowser {
public static WebDriver driver;
To Launch a Single Browser public static void firefoxLaunch() throws Throwable {
without Using WebDriver // TODO Auto-generated method stub
driver=new FirefoxDriver();
[Link]("[Link]
[Link](5000);
[Link]();
public class ChromeBrowserLaunch
}
{
public static void ChromeLaunch() throws Throwable {
// TODO Auto-generated method stub
public static void main(String[]
driver=new ChromeDriver();
args) {
[Link]("[Link]
}
[Link](5000);
[Link]("[Link].
[Link]();
driver","./softwares/[Link]
}
");
public static void EdgeLaunch() throws
ChromeDriver driver=new
InterruptedException {
ChromeDriver();
// TODO Auto-generated method stub
[Link]();
driver=new EdgeDriver();
[Link]("[Link]
[Link](5000);
}
[Link]();
}
public static void main(String[] args) throws Throwable {
firefoxLaunch();
ChromeLaunch();
EdgeLaunch();
}
}
what is Cross Browser Testing?
Executing one script on multiple browsers at the same time. This Process is called as "Cross Browser Testing" It is
also called as Parallel Testing.
Difference between close() and quit() method
Close () Quit()
1.) it will close Singel Tab or Current Tab 2.) It will close Entire Browser.
2.) If we use this Method then the driver file will still be 2.) If we use this Quit() method then browser and driver
executing in the backend file will be completely closed.
Characteristic of get() method
1.) It is Used to launch a URL.
2.) If we don't give the protocol(https) then get method will throw an exception.( in valid argument Exception)
3.) control will be with get() method untill the page is completely loaded.
Important Note :
1.) In order to Launch a browser, We should invoke the constructor of browser specific class.
2.) In order to invoke the constructor, We should create an Object.
3.) If Object is created then the constructor will get invoked and an empty browser will be launched and that
browser address will be stopped inside the reference variable
4.) Driver is a Universal Reference Variable. It is an Industry Standard
public class fetch_TitleofthePage&CurrentUrl {
public static void main(String[] args) throws
InterruptedException {
//[Link]("[Link]",
"./softwares/[Link]");
//[Link]("[Link]",
"./softwares/[Link]");
//[Link]("[Link]",
"./softwares/[Link]");
ChromeDriver driver= new ChromeDriver();
//FirefoxDriver driver=new FirefoxDriver();
//EdgeDriver driver=new EdgeDriver();
[Link](2000);
[Link]().window().maximize();
[Link](2000);
[Link]("[Link]
[Link](2000);
// to fetch the title
String title = [Link]();
[Link](title);
// to fetch the current url
String currentUrl = [Link]();
[Link](currentUrl);
[Link]();
}
FAQs
1. What is WebDriver?
2. How to create WebDriver Reference?
3. How to work with Chrome and IE browsers in Webdriver?
4. What is the Syntax for “[Link]”?
5. How to launch Application using Webdriver?
6. What is the command used for maximise application?
7. From which package we are importing WebDriver?
8. How WebDriver different from RC?
9. What is the latest version of Selenium Server?
- preprared by HemanthKumar C