Selenium – Front-End Automation Testing Tool 


(更多资料和具体参加方法)

This introductory course is designed to familiarize testing professionals with the basics of testing web applications using Selenium. Testers can build, enhance, and maintain scripts using both the Selenium IDE and the Selenium 2 WebDriver. Hands-on instruction is provided for those who want to explore the power of using Selenium. The Selenium IDE plug-in builds effective and resilient test scripts using a wide variety of current programming languages. The focus is on the practical application of Selenium to resolve common web automated testing challenges. This course focuses on getting started with Selenium.
 
What is Selenium?
Selenium is one of the most popular tools for browser based testing. It is an Open Source project that has gained a lot of popularity in the last few years. Even though there are other Open Source (free) tools that can test a web application, like HttpUnit, HtmlUnit etc., this was one of the first tools that provided a real competitor to commercial tools like Quick Test Pro (QTP), and others that had gained significant adoption by the QA Engineers.
Selenium is primarily developed in JavaScript and browser technologies and hence supports all the major browsers on all the platforms. For example, you can have your automation scripts written for Firefox on Windows and run them on Firefox in Mac. Most of the time, you will not need to change your scripts for them to work on Mac. In terms of coverage for platform and browser, Selenium is probably one of the best tools available in the market for web applications.
 
What Selenium is good at?
There are a few factors that have attributed to Selenium’s success.
Since this is a free tool, it often is one of the few options for companies that do not have a lot of budget for Automation tools.
Selenium was first written in Java but it also supports .Net, Ruby, Perl, PHP and Python. This is a big plus when you want to build your framework in a language that has the highest adoption in the organization it is being built within.
Since this instantiates and drives a real browser, as opposed to simulated browser solutions like HtmlUnit, this tool runs in a client that is closer to what a real user would use. This in turn provides more confidence that tests run with this tool would catch most issues that a real user would experience.
It has support for all of the popular browsers like IE, Firefox, Chrome, Safari etc. It also supports several Operating Systems and that makes it a tool of choice for cross browser/ cross platform certification.
The developer community of Selenium is always trying to push the envelope of what can be achieved with browser automation. Drag and drop, key press actions, flex support etc. are some examples of this.
Besides that, there are companies like Sauce Labs who are provide a service called Sauce OnDemand which is a cloud service that allows users to execute their Selenium scripts in parallel.
Once you get Selenium to work for you, it works reliably when used for running the tests over and over again. It’s definitely a lot more reliable than tools like QEngine or JExplorer but about the same as tools like QTP.
 
Selenium components
There are sixcomponentsin Selenium, which can be used in isolation or in combination to create complete automation suite for your web applications.
·         Selenium IDE, Selenium Core
Selenium IDE is the easiest way to use Selenium and most of the time it also serves as a starting point for your automation. Selenium IDE comes as an extension to the Firefox web browser.
Selenium IDE is the only flavor of Selenium which allows you to record user action on browser window. It can also record user actions in most of the popular languages like Java, C#, Perl, Ruby etc. This eliminates the need of learning new vendor scripting language.
For executing scripts created in these languages, you will need to use Selenium Remote Control. If you do not want to use Remote Control, you will need to create your test script in HTML format.
As compared to most of the test automation tools it is very simple and lightweight. The small red button on the right hand side gives you an indication on whether Selenium is in recording mode or not. Also, Selenium IDE will not record any operation that you do on your computer apart from the events on Firefox browser window. So go ahead read your mail, open a word doc or do anything else, Selenium will record only your actions on browser.
·         Selenium Client API
As an alternative to writing tests in Selenese, tests can also be written in various programming languages. These tests then communicate with Selenium by calling methods in the Selenium Client API. Selenium currently provides client APIs for Java, C#, Ruby and Python.
With Selenium 2, a new Client API was introduced (with WebDriver as its central component). However, the old API (using class Selenium) is still supported.
·         Selenium Remote Control
Selenium Remote Control (RC) is a server, written in Java, which accepts commands for the browser via HTTP. RC makes it possible to write automated tests for a web application in any programming language, which allows for better integration of Selenium in existing unit test frameworks. To make writing tests easier, Selenium project currently provides client drivers for PHP, Python, Ruby, .NET, Perl and Java. The Java driver can also be used with JavaScript (via the Rhino engine). A new instance of selenium RC server is needed to launch html test case - which means that the port should be different for each parallel run. However for Java/PHP test case only one Selenium RC instance needs to be running continuously.
With the release of Selenium 2, Selenium RC has been included into Selenium WebDriver.
·         Selenium WebDriver
Selenium WebDriver is the successor to Selenium RC. Selenium WebDriver accepts commands (sent in Selenese, or via a Client API) and sends them to a browser. This is implemented through a browser-specific browser driver, which sends commands to a browser, and retrieves results. Most browser drivers actually launch and access a browser application (such as Firefox or Internet Explorer); there is also anHtmlUnit browser driver, which simulates a browser using HtmlUnit.
Unlike in Selenium 1, where the Selenium RC server was necessary to run tests, Selenium WebDriver does not need a special server to execute tests. Instead, the WebDriver directly starts a browser instance and controls it. However, Selenium Grid can be used with WebDriver to execute tests on remote systems.
As of early 2012, Simon Stewart of Google (inventor of WebDriver) and David Burns of Mozilla are negotiating with the W3C to make WebDriver an internet standard. As such, Selenium-WebDriver (Selenium 2.0) aims to be the reference implementation of the WebDriver standard in various programming languages. Currently Selenium-WebDriver is fully implemented and supported in Python, Ruby, Java, and C#.
In practice, this means that the Selenium 2.0 API has significantly fewer calls than does the Selenium 1.0 API. Where Selenium 1.0 attempted to provide a rich interface for many different browser operations, Selenium 2.0 aims to provide a basic set of building blocks from which developers can create their own Domain Specific Language.
·         Selenium Grid
Selenium Grid is a server that allows tests to use web browser instances running on remote machines. With Selenium Grid, one server acts as the hub. Tests contact the hub to obtain access to browser instances. The hub has a list of servers that provide access to browser instances (WebDriver nodes), and lets tests use these instances. Selenium Grid allows to run tests in parallel on multiple machines, and to manage different browser versions and browser configurations centrally (instead of in each individual test).
 
Course Outline
·         Introduction
·         An Overview of Selenium
o   Selenium And The Web Testing Frameworks
o   How It All Started
·         The Selenium IDE
o   An Overview
o   Presentation
o   Exporting Features
o   Installation and Setup
·         Test Cases and Test Suites
o   Selenese
o   Test Suites
·         Commands
o   Actions
o   Accessors
o   Assertions
·         Locators
o   Identifier
o   Id
o   Name
o   Link
o   DOM
o   XPath
o   CSS
o   UI-Element
o   Structure-Dependent
·         Selenium Remote Control
o   The Selenium Server
o   Using Client Libraries
·         Selenium Grid Basics
·         Techniques For Testing
o   What Tests?
o   When?
o   Best Practices for Testing Your Apps
o   Best Practices And Patterns
o   Toolbox
·         Selenium 2.0
o   Key Features
 
 


(更多资料和具体参加方法)

 
本页最后更新:02/22/2022 02:43:18 | -- | 网站设计和虚拟主机服务 WECAN