Testing With Selenium - Open source Test Automation Tool

Slides:



Advertisements
Similar presentations
Facts about Welcome to this video from Ozeki. In this video I will present what makes Ozeki Phone System XE the Worlds best on-site software PBX for Windows.
Advertisements

Selenium Automation Testing Suite of Tools
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 4: Web Browsing.
Web Server Programming
Automating with Open Source Testing Tools Corey McGarrahan rSmart 01-July-08.
Selenium HP Web Test Tool Training
Lesson 4: Web Browsing.
Server-Side vs. Client-Side Scripting Languages
The easy way to a nice looking website design By a total non-designer (Me!)
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
Selenium Automation Testing Suite of Tools. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
Linux Operations and Administration
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Classroom User Training June 29, 2005 Presented by:
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Grid Chemistry System Architecture Overview Akylbek Zhumabayev.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Selenium and Selenium on Rails. Agenda  Overview of Selenium Simple Selenium Tests Selenium IDE  Overview of Selenium on Rails  Problems with Selenium.
Web Automation Testing With Selenium By Rajesh Kanade.
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 1.
1 Chapter 01: Introduction by Tharith Sriv. This course covers the following topics:  Hypertext Markup Language (HTML)  Cascading Style Sheets  JavaScript.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training.
Selenium Date:06/10/2009. May 13, Agenda Testing – Test Automation Selenium – Introduction – Features – Supported platforms Selenium Commands –
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
Web Scraping with Python and Selenium. What is Web Scraping?  Software technique for extracting info from websites Get information programmatically that.
Learning Aim C.  In this section we will look at some simple client-side scripts, browser compatibility, exporting and compressing and suitable file.
1 How to Publish Your HTML Page on the Web. Every USF Student has a website 2 Your Net ID You have a directory on the server.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Web driver and its comparison Selenium RC. Selenium web driver: It's web automation testing out framework that assists to execute assessments throughout.
MIKADO – Generation of ISO – SeaDataNet metadata files
Web Programming Language
Tonga Institute of Higher Education IT 141: Information Systems
Selenium and Selenium on Rails
JRA2: Acceptance Testing senarious
Testing with Selenium IDE
Links and Comments in HTML5
Lesson 4: Web Browsing.
Google Web Toolkit - Gufran Mohammed
Make Links from your Baan System
Introduction to Programming the WWW I
Developing Web-Based Applications
PHP / MySQL Introduction
EUEM (End User Experience Monitoring) Training
An Introduction to Using
What is selenium? Selenium is a portable software-testing framework for web applications. Selenium provides a playback (formerly also recording) tool.
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
Tonga Institute of Higher Education IT 141: Information Systems
Automation with Gwen Introduction.
Configuring Internet-related services
Tonga Institute of Higher Education IT 141: Information Systems
Cordova & Cordova Plugin Installation and Management
Lesson 4: Web Browsing.
Selenium Web Test Tool Training Using Ruby Language
Selenium Tutorials Cheyat Training.
Review of Previous Lesson
Web Application Development Using PHP
Selenium IDE Installation and Use.
Presentation transcript:

Testing With Selenium - Open source Test Automation Tool By: Niranjan Limbachiya #Title

Agenda Selenium Origin What is Selenium? Platform and Browser compatibility Selenium IDE How to work with Selenium IDE? Selenium CORE Testing Application with IDE/CORE? Selenium-RC Way to Test Application in IE Test IE application with PHPUnit DATA-Driven QMetry- Live Example #Title

Selenium Origin Selenium is a chemical element in the periodic table that has the symbol Se and atomic number 34 Selenium was developed by team of Programmers and testers at ThoughtWorks to test their web based time and expenses system. Javascript Functional Test Runner was written by Jason Huggins, Paul Gross and Jie Tina Wang, in 2004. #Title

What is Selenium and whats it for? Selenium tests run directly in a browser, just as real users do A java Script Based Open Source Web Testing Tool That Support web 2.0 Application On Multiple Browser And multiple OS No other test tool covers such a wide array of platforms #Title

Contd.. Selenium is not meant for unit testing Its used for Functional or system Testing But Not for Performance Testing

Platform and Browser compatibility Supported Platforms: Windows: Internet Explorer 6.0 Firefox 0.8 to 1.5 Mozilla Suite 1.6+, 1.7+ Seamonkey 1.0 Opera 8 Mac OS X: Safari 1.3+ Camino 1.0a1 Linux: Konqueror #Title

Driven Mode. Test Case in different Language Introduction Selenium IDE RC CORE Record Mode Bot Mode: HTML tables Driven Mode. Test Case in different Language

Selenium IDE Selenium IDE is an integrated development environment for Selenium tests It is implemented as a Firefox extension. (Note no IE Extension Available) It allows us to record, edit, and debug tests Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run. Selenium IDE is not only recording tool: it is a complete IDE You can choose to use its recording capability, or you may edit your scripts by hand

How to Start work with Selenium IDE? Download from http://www.openqa.org/selenium-ide/download.action When you will download selenium IDE with firefox, it should automatically ask you to install the plugin. In case if we downloaded the file with Opera or IE. No problem:

Contd.. Open firefox from the menu: Tools ->Add-ons--> Extensions now drag-n-drop the xpi file to the extensions window restart firefox You can see a 'Selenium IDE' entry from your tools menu Note: First, Always we have to record test in IDE with Fire fox, then we could playback in IE using seleniumTest runner and also for Phpunit(RC)

IDE

Features: Easy record and playback Debug and set breakpoints Autocomplete for all common Selenium commands Save tests as HTML, PHP scripts, or any other format Support for Selenium user-extensions.js file Option to automatically assert the title of every page

Selenium-CORE Selenium core is a test tool for web For Web application Selenium core tests run directly In a browser Just as real users do !! Written in Pure JAVAScript And DHTML

How to Start work with Selenium CORE? To use Selenium Core, you need to make it available from the same web server as the application you want to test Normally, this is as simple as extracting the Selenium Core zip file into the Document Root, htdocs, or webroot of your webserver. Then, try to open the TestRunner.html page on your website, which should be in the core/ directory.

Live Example Testing Google/QMetry Application with IDE and Core

HTA Mode Selenium Core provides an additional mechanism for running automated tests called "HTA mode.“ An hta file is simply an html file but the extension “. hta” means that when we navigated to IE, it will apply same strict security measure Window+Selenium core+IE To run Selenium Core in HTA mode, just double-click on TestRunner.hta, in the /core directory of your Selenium installation.

Selenium RC Allow us to write automated web application in any programming language (Java, .NET, Perl, Python, Ruby, PHP) The Selenium Server communicates directly with browser using AJAX Selenium Server acts as a client-configured HTTP proxy, to stand in between the browser and your website. Selenium Remote Control provides a Selenium Server, which cans automatically start/stop/control, any supported browser

RC Architecture

How to Start Selenium Server The Selenium Server is written in Java, and requires the Java Runtime Environment (JRE) version 1.5.0 or higher in order to start. You may already have it installed. Try running this from the command line: java –version Once you've got Java installed and ready to go, you can start the Selenium Server from the command line like this: Go to /selenium directory/server/ java -jar selenium-server.jar -interactive

Contd.. That will start the Selenium Server and allow you to type commands in the command window. After a number of log messages, you should see the following message: Entering interactive mode... type Selenium commands here (e.g: cmd=open&1=http://www.yahoo.com)  Let's begin by using Selenium Server to open up a browser. If you're on Windows and want to run your Selenium commands using Internet Explorer, try typing this: cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com

Contd.. If all goes well, you should see a new browser window starting with the browser of your choice. Back in the Selenium Server command window, you should see the following message: Got result: OK, 260113 on session 260113

How I Solved this Error?? When I Test Remote Site through PHPUnit then I was getting following error Error: Testing_Selenium_Exception: could not get response form RC I have started My server through following command Java –jar selenium-server.jar -proxyInjectionMode

They Keep two automated test windows ProxyInjectionMode "Proxy injection" mode is a new highly experimental feature for 0.9.0 Normal Mode ProxyInjectionMode Mode They Keep two automated test windows 1.Selenium 2.Your Application

ProxyInjectionMode They eliminate the separate Selenium window, in favor of "injecting" Selenium into every HTML page By injecting ourselves into the HTML, They have increased control over our application To use PI mode, you need to start the Selenium Server with a special command line argument, like this java -jar selenium-server.jar –proxyInjectionMode cmd=getNewBrowserSession&1=*pifirefox&2=http://www.google.com

Test Application in IE Two way to Test Application in IE Directly click on .hta file Through PHPUnit Elevated Security Privilege The two experimental "elevated security privilege" browser launchers are: *iehta: Launches Internet Explorer as an HTML Application (HTA). *chrome: Launches Firefox using a chrome URL.

Test IE Application with PHPUnit CASE I: If Selenium Server is in Proxy InjectionMode Start server in Proxy Injection Mode Run Selenium IDE and record step with firefox Go to OptionsFormatPHP-selenium RC Copy that PHP code and paste in PHPUnit Folder PHPUnit will be in C:\Program Files\xampp\php\pear\PHPUnit Make xyz.php file (you could give different Name) Open that PHP file and change following line from $this-Selenium= new Testing_Selenium (“*firefox”,http://localhost:4444/); to $this-Selenium= new Testing_Selenium(“*iexplore”,http://localhost:4444/); Now type command phpunit xyz.php It will open IE browser for you and Test the application

CASE II: If Selenium Server isn’t in Proxy InjectionMode Start server in Proxy Injection Mode Run Selenium IDE and record step with firefox Go to OptionsFormatPHP-selenium RC Copy that PHP code and paste in PHPUnit Folder PHPUnit will be in C:\Program Files\xampp\php\pear\PHPUnit Make xyz.php file (you could give different Name) Open that PHP file and change following line from $this-Selenium= new Testing_Selenium (“*firefox”,http://localhost:4444/); to $this-Selenium= new Testing_Selenium(“*iehta”,http://localhost:4444/);

DATA-Driven Code to Fetch Data from Excel Sheet //code added by Niranjan $arr=array(1=>'a','b','c','d','e'); $filename = "c:\Info1.xls"; $sheet1 = "sheet1"; $excel_app = new COM("Excel.application") or Die ("Did not connect"); $Workbook = $excel_app->Workbooks->Open($filename) or Die("Did not open $filename $Workbook"); $Worksheet = $Workbook->Worksheets($sheet1); $Worksheet->activate; //$excel_cell = $Worksheet->Range("A1"); $excel_cell->activate; for($i=1; $i<5;$i++) { for($j=1; $j<5;$j++) $excel_cell = $Worksheet->Range($arr[$i].$j); print "The value is $arr[$i].$j => \n" .$excel_cell->value; }

QMetry- Live Example Add User into Qmetry-UPM module without Repository Add User with Repository

Question !!!

www.openqa.org/selenium www.nealford.com For more Information about Selenium Use my following Blog Address http://seleniumtest.wordpress.com Thank You Niranjan Limbachiya niranjan.limbachiya@infostertch.com