Upload
vijay-rangaiah
View
1.198
Download
1
Tags:
Embed Size (px)
Citation preview
Open Source & Test Automation
Generations of various Framework & Scripting techniques
What is Selenium
Benefits of Selenium
Browser, Operating Systems & Languages Support
History of Selenium & Seleniumhq.org
Selenium IDE, RC, WebDriver & Grid
Why choose Selenium?
Growing importance of Selenium
Integration with Java and .NET
Demo of Automation to http://www.nie.ac.in/
Question & Answers
Over View of Seminar
2Selenium Open Source Test Automation Tool23/02/2013
Selenium Open Source Test Automation Tool 323/02/2013
Open Source Software
Open Source Software (OSS) is computer software with it Source code made available & licensed with an open source license in which the copyright holder provides the rights to study, change & distribute the software to anyone & for any purpose.
Test Automation
Test automation is the use of Special Software to control the execution of tests and the comparison of actual outcomes to predicted outcomes.
FrameworkA framework is an integrated system that sets the rules of automation for a specific product
Selenium Open Source Test Automation Tool
423/02/2013
Generations of Various Framework & Scripting techniques
1st Generation: Linear – Procedural code, possibly generated by tools, such as record & playback scripting.
2nd Generation: Structured – Use control structures, if-else, switch, for, while conditions / statements.
3rd Generation: Data driven – Test script data persist outside the script in DB, spreadsheet, cvs, etc.
4th Generation: Keyword driven – Test script instructions / statements persist in spreadsheet, property files.
5th Generation: Hybrid – two or more of the patterns above are user, its also called as script less automation (less scripting)
What is Selenium
Selenium is an open source testing tool for automating web based applications.
It can automate only web based applications. It works on multiple browsers and multiple operating systems.
Helpful to distribute/scale your test cases across multiple platforms.
Being open source and very strong in nature, demand for this tool is increasing.
Components of Selenium
Selenium IDE Selenium 1 (Remote Control) Selenium 2 (WebDriver) Selenium Grid
5Selenium Open Source Test Automation Tool23/02/2013
Benefits of Selenium
Open source
Works on multiple browsers
Works on multiple Operating Systems
Supports many languages for scripting
Supports to tests Ajax Applications, Flash Applications & Database Testing
Multiple test frameworks are supported (Junit4, TestNg, Data driven, Keyword driven, Hybrid, etc)
Can be used for Functional, Regression & Browser compatibility testing
6Selenium Open Source Test Automation Tool23/02/2013
8Selenium Open Source Test Automation Tool
You need to download & configure the required library from the url
http://seleniumhq.org/download/
23/02/2013
http://seleniumhq.org/
The official website of Selenium, contents of the web site
Projects: Selenium IDE Selenium Remote Control Selenium WebDriver Selenium Grid
Downloads: You can find the latest releases of all the Selenium components
Documentation: Complete Selenium Documentation with Programming Language Preference to Java, C# (Csharp), Python, Ruby, Php, Perl
Support: Getting Help, User Group, Chat Room, Bug Tracker, Commercial Support
About Selenium: News/Blog, Selenium Events, Who made Selenium, History, Roadmap, Get involved, Documentation. Selenium sponsors.
10Selenium Open Source Test Automation Tool23/02/2013
Selenium IDE (Integrated Development Environment)
The IDE is a record and playback tool with built-in debugger and editor
The IDE is an add-on for Mozilla Firefox only, works only on Firefox.
The IDE automatically creates test scripts in the Selenese HTML table format
The IDE can generate code into a wide variety of languages and test frameworks. Such as HTML Selenese, C#, Java, Perl, PHP, Python, Ruby, Bromine, JUnit, NUnit, RSpec, Test::Unit, TestNG, etc.
11Selenium Open Source Test Automation Tool23/02/2013
Selenium WebDriver
WebDriver is designed to providing an simpler, more concise programming interface along with addressing some limitations in the Selenium-RC API (Application Program Interface).
Selenium-WebDriver was developed to better support dynamic web pages.
Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation.
You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver.
14Selenium Open Source Test Automation Tool23/02/2013
15
Flow of Selenium RC
Flow of Selenium Web Driver
23/02/2013 Selenium Open Source Test Automation Tool
Selenium selenium = new DefaultSelenium("localhost",4444, "*chrome", “http://www.nie.ac.in");
Selenium Open Source Test Automation Tool 16
Selenium Web Driver flow for Chrome & IE browser
public static WebDriver driver;driver = new ChromeDriver();
public static WebDriver driver;driver = new InternetExplorerDriver();
23/02/2013
Selenium Grid• The Grid distributes your tests on multiple machines so that you can
run your tests in parallel– Tests can be ran in parallel for reduced execution time– Test can be ran on various browser and operating system
combinations– Generates a collated report from all test machines
• The Grid can be run on a server farm or in the Cloud– The tests are distributed by the Hub server to multiple Selenium
RC machines– The tests can be ran by various Cloud computing services such
as Amazon EC2, Sauce Labs, BrowserMob, and PushToTest– The Grid is written in Java for portability and is executed from
the command line
17Selenium Open Source Test Automation Tool23/02/2013
Selenium Grid - Concept
Selenium Grid can be used to run multiple instances on various operating system and browser configurations.
19Selenium Open Source Test Automation Tool23/02/2013
Why choose Selenium?
• The Selenium client libraries can be imported into most popular language IDE’s– Eclipse, NetBeans, Visual Studio .NET, etc.– Reuses existing unit testing frameworks– Integrated into Fitnesse frameworks
• Used by QA test teams for functional, regression, and user acceptance testing (UAT)
• Integration into the build process has made it easy to deploy into Continuous Integration Environments
• Used by Developers for test driven development (TDD) in the Agile and extreme programming (XP) community
20Selenium Open Source Test Automation Tool23/02/2013
Why choose Selenium?
• Expanded usage by Developers into other areas– Conversion into production monitoring and load testing– Extended hooks into Flash, Flex, and other popular technologies
• Strong support for AJAX technologies
• Cross platform browser and operating system comparison testing
• Run tests in parallel– Using the Grid tests can be run in parallel across multiple RC
(agent) machines from a single Hub machine– Saves time, and runs faster
21Selenium Open Source Test Automation Tool23/02/2013
Why choose Selenium?• Selenium is FREE!
– No licensing costs, so it can be deployed to as many machines as needed in a lab or for local development
– No maintenance renewal costs
• Use Cloud computing services– If hardware is a limited, then opt to have a remote test lab in the
Cloud as needed– Amazon EC2 (functional, regression testing)– Sauce Labs (functional, regression testing)– BrowserMob (production monitoring, load testing)– PushToTest (production monitoring, functional testing, load testing)
22Selenium Open Source Test Automation Tool23/02/2013
Integration with Java and .NETJava• Object oriented
– Design and programming
• TestNG/JUnit
– Common unit test framework
• Ant/Maven
– Automatically build, deploy, and test application
• Bamboo/Hudson
– Continuous integration
– Automated test reporting/notification
.NET• Object oriented
– Design and programming
• VSUnit, NUnit, MBUnit
– Common unit test framework
• TFS Build
– Automatic build verification tests (BVT)
– Continuous integration
– Automated test reporting/notification
24Selenium Open Source Test Automation Tool23/02/2013
Integration with Java and .NETJava• Spring /Struts
– Integrates with application
– Interface with Java components
– Interface with Web services
– Access Oracle/MySQL databases
.NET• .NET Framework
– Integrates with application
– Interface with .NET components
– Interface with Web services
– Access SQL Server databases
25Selenium Open Source Test Automation Tool23/02/2013
Thank you for your time!
Vijay Kumar R
27Selenium Open Source Test Automation Tool23/02/2013