• Save
Automation Testing using Selenium
Upcoming SlideShare
Loading in...5
×
 

Automation Testing using Selenium

on

  • 3,666 views

End-to-End Automation Testing using Selenium

End-to-End Automation Testing using Selenium

Statistics

Views

Total Views
3,666
Views on SlideShare
3,653
Embed Views
13

Actions

Likes
9
Downloads
1
Comments
0

2 Embeds 13

http://www.linkedin.com 12
http://www.scoop.it 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Automation Testing using Selenium Automation Testing using Selenium Presentation Transcript

  • 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 Point 428.9F ● Element Classification Non-Metal ● Crystal Structure Hexagonal
  • 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 ………
  • 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-based applications. • Works anywhere JavaScript is supported • Hooks for many other languages - Java, Ruby, Python
  • 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
  • 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
  • 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.
  • SELENIUM COMPONENTS Selenium Components ● Selenium Core ● Selenium IDE ● Selenium RC (Remote Control) ● Selenium Web Drivers ● Selenium Grid
  • 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
  • SELENIUM COMPONENTS Selenium Components ● Selenium 1 (ThoughtWorks Inc) ● Selenium Core ● Selenium IDE ● Selenium RC (Remote Control) Javascript based component library.
  • 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.
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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 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.
  • 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.
  • SELENIUM RC
  • 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
  • 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.
  • Thank You