END-TO-END
TEST AUTOMATION
USING
SELENIUM
By Naresh Chintalcheru
WHAT IS SELENIUM
● Selenium is a chemical element
● Chemical Symbol Se
● Atomic Number 34
● Atomic Mass 78.96
● Melting Po...
INTRODUCTION TO SELENIUM
Who named Automation Testing Tool as Selenium ?
● Jason Huggins and team from ThoughWorks Inc. de...
WHAT IS SELENIUM
• Selenium is an Open Source Browser based
Test Automation software.
WHAT IS SELENIUM
• Selenium is a robust set of suite of tools which
supports rapid development of test automation for
web-...
TESTING TOOLS IN THE MARKET
Commercial Testing Tools
● QTP
● HP Mercury WinRunner
● IBM Rational Functional Tester
● Micro...
WHAT IS SELENIUM
Selenium is ………
● Browser based Web Application testing tool
● Open Source License
● Extensible Framework...
ADVANTAGES OF SELENIUM
Advantages of Selenium
● Open Source, free of cost for companies
● Supports Native Testing for all ...
SELENIUM COMPONENTS
Selenium Components
● Selenium Core
● Selenium IDE
● Selenium RC (Remote Control)
● Selenium Web Drive...
SELENIUM COMPONENTS
Selenium Components
● Selenium 1.x (ThoughtWorks Inc)
● Selenium Core
● Selenium IDE
● Selenium RC (Re...
SELENIUM COMPONENTS
Selenium Components
● Selenium 1 (ThoughtWorks Inc)
● Selenium Core
● Selenium IDE
● Selenium RC (Remo...
SELENIUM COMPONENTS
Selenium Components
● Selenium 2 (Google Inc)
● Selenium Web Drivers
All browsers provide Native exten...
SELENIUM CORE
Selenium Core:
● Selenium Core is a component core JavaScript Library
developed by the Jason Huggins and Tho...
SELENIUM IDE
Selenium IDE:
● Can do Record and Playback
● Create & edit Test Cases & Test Suites
● Extensions for Firefox
...
SELENIUM IDE
Execution
Commands
Try the test in
the Web based
TestRunner
Reference of the
currently selected
command
Recor...
Softsmith Infotech
GENERAL SELENESE COMMANDS
● clicking a link - click or clickAndWait commands
● entering values - type c...
RUNNING YOUR FIRST SELENIUM
SCRIPT
● Make sure the application is in the common base
state.
● Click on the run button. Her...
CREATING A TEST SUITE
● In the Selenium IDE you
can create any number of
test cases and save them
as test suite.
● To Run ...
PLAYING THE TEST SUITE WITH TEST
RUNNER
● Test Runner allows you to run the test case in a browser
loaded with the Seleniu...
Softsmith Infotech
TEST RUNNER
Click this button to run all the
tests
RUNNING OPTIONS
Run a Test Case
Click the Run button to run the currently displayed test case.
Run a Test Suite
Click the ...
SELENIUM RC
Selenium Remote Control (RC) :
● Selenium RC is a test tool that allows you to write
automated web application...
SELENIUM RC
SELENIUM WEB DRIVERS
● Selenium Web Driver is in version 2.0
● Selenium Web Driver APIs makes Native API calls to the
brow...
SELENIUM GRID
● Selenium-Grid allows the Selenium-RC solution to scale
for test suites or test suites to be run in multipl...
Thank You
Upcoming SlideShare
Loading in...5
×

Automation Testing using Selenium

12,128

Published on

End-to-End Automation Testing using Selenium

Published in: Technology
1 Comment
32 Likes
Statistics
Notes
No Downloads
Views
Total Views
12,128
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
1
Likes
32
Embeds 0
No embeds

No notes for slide

Transcript of "Automation Testing using Selenium"

  1. 1. END-TO-END TEST AUTOMATION USING SELENIUM By Naresh Chintalcheru
  2. 2. WHAT IS SELENIUM ● Selenium is a chemical element ● Chemical Symbol Se ● Atomic Number 34 ● Atomic Mass 78.96 ● Melting Point 428.9F ● Element Classification Non-Metal ● Crystal Structure Hexagonal
  3. 3. INTRODUCTION TO SELENIUM Who named Automation Testing Tool as Selenium ? ● Jason Huggins and team from ThoughWorks Inc. developed the testing tool in 2004. ● Huggins joked about competitor HP Mercury Tools saying cure mercury poisoning by taking Selenium supplements. ● Hence the name ………
  4. 4. WHAT IS SELENIUM • Selenium is an Open Source Browser based Test Automation software.
  5. 5. WHAT IS SELENIUM • Selenium is a robust set of suite of tools which supports rapid development of test automation for web-based applications. • Works anywhere JavaScript is supported • Hooks for many other languages - Java, Ruby, Python
  6. 6. TESTING TOOLS IN THE MARKET Commercial Testing Tools ● QTP ● HP Mercury WinRunner ● IBM Rational Functional Tester ● Micro Focus Silk Test Open Source Testing Tools ● Selenium ● Watir ● Sikuli ● FitNesse
  7. 7. WHAT IS SELENIUM Selenium is ……… ● Browser based Web Application testing tool ● Open Source License ● Extensible Framework ● Support Mobile Testing Android/iOS ● Write Test Cases using Language of choice Java, C#, Python, Ruby & HTML ● Supports Native Browser Testing
  8. 8. ADVANTAGES OF SELENIUM Advantages of Selenium ● Open Source, free of cost for companies ● Supports Native Testing for all major Browsers ● Customize According to the Requirements ● AJAX based Testing ● Only tool to support Test Case Language of Choice Java, C#, Python & Ruby. ● Selenium 2 .., Web Drivers is developed by Google and all the google products are tested with Selenium. ● Web 2.0 companies such as Facebook, Twitter, LinkedIn, Groupon uses Selenium.
  9. 9. SELENIUM COMPONENTS Selenium Components ● Selenium Core ● Selenium IDE ● Selenium RC (Remote Control) ● Selenium Web Drivers ● Selenium Grid
  10. 10. SELENIUM COMPONENTS Selenium Components ● Selenium 1.x (ThoughtWorks Inc) ● Selenium Core ● Selenium IDE ● Selenium RC (Remote Control) ● Selenium 2.x (Google Inc) ● Selenium Web Drivers ● Selenium Grid
  11. 11. SELENIUM COMPONENTS Selenium Components ● Selenium 1 (ThoughtWorks Inc) ● Selenium Core ● Selenium IDE ● Selenium RC (Remote Control) Javascript based component library.
  12. 12. SELENIUM COMPONENTS Selenium Components ● Selenium 2 (Google Inc) ● Selenium Web Drivers All browsers provide Native extensions for Add-ons Selenium Web Driver APIs allow driving a browser Natively for automation testing is the advanced feature google added to Selenium.
  13. 13. SELENIUM CORE Selenium Core: ● Selenium Core is a component core JavaScript Library developed by the Jason Huggins and ThoughtWorks Team. ● Selenium Core is the foundation for other components Selenium IDE & Selenium RC
  14. 14. SELENIUM IDE Selenium IDE: ● Can do Record and Playback ● Create & edit Test Cases & Test Suites ● Extensions for Firefox ● Run Selenese Commands ● Convert Test Case to different languages
  15. 15. SELENIUM IDE Execution Commands Try the test in the Web based TestRunner Reference of the currently selected command Record test actions Specify commands, including asserts
  16. 16. Softsmith Infotech GENERAL SELENESE COMMANDS ● clicking a link - click or clickAndWait commands ● entering values - type command ● selecting options from a drop-down listbox - select command ● clicking checkboxes or radio buttons - click command
  17. 17. RUNNING YOUR FIRST SELENIUM SCRIPT ● Make sure the application is in the common base state. ● Click on the run button. Here you can also control the speed of the execution using the toolbar ● Once the test is run you can view the test log in the bottom of the IDE window
  18. 18. CREATING A TEST SUITE ● In the Selenium IDE you can create any number of test cases and save them as test suite. ● To Run the test Suite click on the “Play entire test suite” button as shown below. Test Suite with Test1 & test2
  19. 19. PLAYING THE TEST SUITE WITH TEST RUNNER ● Test Runner allows you to run the test case in a browser loaded with the Selenium-Core TestRunner. ● Test runner is invoked by clicking the below Shown button in the IDE On Clicking the Test Runner Button you will the window as seen in the next slide
  20. 20. Softsmith Infotech TEST RUNNER Click this button to run all the tests
  21. 21. RUNNING OPTIONS Run a Test Case Click the Run button to run the currently displayed test case. Run a Test Suite Click the Run All button to run all the test cases in the currently loaded test suite. Stop and Start The Pause button can be used to stop the test case while it is running. The icon of this button then changes to indicate the Resume button. To continue click Resume. Stop in the Middle You can set a breakpoint in the test case to cause it to stop on a particular command. This is useful for debugging your test case. To set a breakpoint, select a command, right- click, and from the context menu select Toggle Breakpoint.
  22. 22. SELENIUM RC Selenium Remote Control (RC) : ● Selenium RC is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser. Selenium RC comes in two parts. ● A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them. ● Client libraries for your favorite computer language.
  23. 23. SELENIUM RC
  24. 24. SELENIUM WEB DRIVERS ● Selenium Web Driver is in version 2.0 ● Selenium Web Driver APIs makes Native API calls to the browser. ● Native automation faster and a little less prone to error and browser configuration ● Does not Requires Selenium-RC Server to be running ● Access to headless HTMLUnit can allow really fast tests ● Selenium Web Driver will replace Selenium RC
  25. 25. SELENIUM GRID ● Selenium-Grid allows the Selenium-RC solution to scale for test suites or test suites to be run in multiple environments. ● With Selenium-Grid multiple instances of Selenium-RC are running on various operating system and browser configurations, each of these when launching register with a hub. When tests are sent to the hub they are then redirected to an available Selenium-RC, which will launch the browser and run the test. ● This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test.
  26. 26. Thank You

×