0% found this document useful (0 votes)
78 views17 pages

Automation - Introduction

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 17

Web automation testing training

Introduction to automation
testing

Gabriel Carabat

1
Agenda

• Automation testing
• What to test
• Framework approach
• Automation tools
• Introducing Selenium
• History of Selenium
• Selenium's tools
• Supported platforms and browsers
• References
• Q &A

2
IN YOUR ZONE
Automation testing

• Test automation is the use of special software (separate from the software being tested) to
control the execution of tests and the comparison of actual outcomes to predicted outcomes.
Test automation can automate previous repetitive but necessary testing in a formalized testing
process already in place, or add additional testing that would be difficult to perform manually.

• Some software testing tasks, such as extensive low-level interface regression testing, can be
laborious and time consuming to do manually.

• In addition, a manual approach might not always be effective in finding certain classes of defects.
Test automation offers a possibility to perform these types of testing effectively. Once tests have
been automated, they can be run quickly and repeatedly. This is many times a cost effective
method of regression testing for software products that have a long maintenance life. Even minor
patches over the lifetime of the application can cause features to break which were working at an
earlier point in time.

IN YOUR ZONE 3
Automation testing

• Test automation is the use of special software (separate from the software being tested) to
control the execution of tests and the comparison of actual outcomes to predicted outcomes.
Test automation can automate previous repetitive but necessary testing in a formalized testing
process already in place, or add additional testing that would be difficult to perform manually.

• There are two general approaches to test automation:


l
Code-driven testing. The public (usually) interfaces to classes, modules or libraries are tested
with a variety of input arguments to validate that the results that are returned are correct.
l
Graphical user interface testing. A testing framework generates user interface events such as
keystrokes and mouse clicks, and observes the changes that result in the user interface, to
validate that the observable behavior of the program is correct.

IN YOUR ZONE 4
What to test

• Testing tools can help automate tasks such as product installation, test data creation, GUI
interaction, problem detection (consider parsing or polling agents equipped with oracles), defect
logging, etc., without necessarily automating tests in an end-to-end fashion.

• One must keep satisfying popular requirements when thinking of test automation:
l
Platform and OS independence
l
Data driven capability (Input Data, Output Data, Metadata)
l
Easy debugging and logging
l
Version control friendly – minimal binary files
l
Extensible & Customizable (Open APIs to be able to integrate with other tools)

IN YOUR ZONE 5
What to test

l
Common Driver (For example, in the Java development ecosystem, that means Ant or Maven
and the popular IDEs). This enables tests to integrate with the developers' workflows.
l
Support unattended test runs for integration with build processes and batch runs. Continuous
integration servers require this.
l
Email Notifications (automated notification on failure or threshold levels). This may be the test
runner or tooling[clarification needed] that executes it.
l
Support distributed execution environment
l
Distributed application support

IN YOUR ZONE 6
Framework approach

l
A framework is an integrated system that sets the rules of automation of a specific product.
This system integrates the function libraries, test data sources, object details and various
reusable modules. These components act as small building blocks which need to be assembled
to represent a business process. The framework provides the basis of test automation and
simplifies the automation effort.
l
Various types of frameworks. They are categorized on the basis of the automation component
they leverage: Data-driven testing, Modularity-driven testing, Keyword-driven testing , Hybrid
testing Model-based testing, Code driven testing

IN YOUR ZONE 7
Automation tools

l
Some notable automation tools:

IBM Rational Functional Tester (IBM Rational)

HP QuickTest Professional (HP Software Division)

Selenium (Open Source)

TestComplete (SmartBear Software)

Watir (Open Source)

Visual Studio Test Professional (Microsoft)

IN YOUR ZONE 8
Introducing Selenium

• Selenium is a set of different software tools each with a different approach to supporting test
automation.

• Most Selenium QA Engineers focus on the one or two tools that most meet the needs of their
project, however learning all the tools will give you many different options for approaching
different test automation problems. The entire suite of tools results in a rich set of testing
functions specifically geared to the needs of testing of web applications of all types.

• These operations are highly flexible, allowing many options for locating UI elements and
comparing expected test results against actual application behavior. One of Selenium’s key
features is the support for executing one’s tests on multiple browser platforms.

IN YOUR ZONE 9
History of Selenium

• 2004 - Jason Huggins


• He realized there were better uses of his time than manually stepping through the same tests
with every change he made. He developed a Javascript library that could drive interactions with
the page, allowing him to automatically rerun tests against multiple browsers

• That library eventually became Selenium Core, which underlies all the functionality of Selenium
Remote Control (RC) and Selenium IDE. Selenium RC was ground-breaking because no other
product allowed you to control a browser from a language of your choice.

• Because of its Javascript based automation engine and the security limitations browsers apply to
Javascript, different things became impossible to do

IN YOUR ZONE 10
History of Selenium

• Web applications became more and more powerful over time, using all sorts of special features
new browsers provide and making this restrictions more and more painful

• 2006 - Simon Stewart (Google) - started work on a project he called WebDriver - project began
with the aim to solve the Selenium’ pain-points.

• 2008 - Simon Stewart - merging of Selenium and WebDriver


• Selenium had massive community and commercial support, but WebDriver was clearly the tool of
the future

• Why merging:
l
because webdriver addresses some shortcomings in selenium (by being able to bypass the JS
sandbox), supporting a broader range of browsers,

IN YOUR ZONE 11
Selenium's tools

• Selenium IDE - (Integrated Development Environment) is a prototyping tool for building test
scripts. It is a Firefox plugin and provides an easy-to-use interface for developing automated tests.
Selenium IDE has a recording feature, which records user actions as they are performed and then
exports them as a reusable script in one of many programming languages that can be later
executed.

• Selenium 1 (aka. Selenium RC or Remote Control) - was the main Selenium project for a long
time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more
powerful tool.

• Selenium 1 is still actively supported (mostly in maintenance mode) and provides some features
that may not be available in Selenium 2 for a while, including support for several languages (Java,
Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there.

IN YOUR ZONE 12
Selenium's tools

• Selenium 2 is the future direction of the project and the newest addition to the Selenium toolkit.
This brand new automation tool provides all sorts of awesome features, including a more
cohesive and object oriented API as well as an answer to the limitations of the old
implementation.

• Selenium-Grid - allows the Selenium RC solution to scale for large test suites and for test suites
that must be run in multiple environments. Selenium Grid allows you to run your tests in parallel,
that is, different tests can be run at the same time on different remote machines. This has two
advantages. First, if you have a large test suite, or a slow-running test suite, you can boost its
performance substantially by using Selenium Grid to divide your test suite to run different tests at
the same time using those different machines. Also, if you must run your test suite on multiple
environments you can have different remote machines supporting and running your tests in them
at the same time. In each case Selenium Grid greatly improves the time it takes to run your suite
by making use of parallel processing.

IN YOUR ZONE 13
Supported Browsers and Platforms

• In Selenium 2.0, the supported browsers vary depending on whether you are using Selenium-
WebDriver or Selenium-RC.

• Selenium-WebDriver supports the following browsers along with the operating systems these
browsers are compatible with.

• Google Chrome 12.0.712.0+

• Internet Explorer 6, 7, 8, 9 - 32 and 64-bit where applicable

• Firefox 3.0, 3.5, 3.6, 4.0, 5.0, 6, 7

• Opera 11.5+

• HtmlUnit 2.9

• Android – 2.3+ for phones and tablets (devices & emulators)

• iOS 3+ for phones (devices & emulators) and 3.2+ for tablets (devices & emulators)

IN YOUR ZONE 14
References

• http://en.wikipedia.org/wiki/Test_automation
• http://seleniumhq.org/docs/index.jsp

IN YOUR ZONE 15
Q&A

Q&A

IN YOUR ZONE 16
The end

Gabriel Carabat
[email protected]
Tel +40 765 982 657 |Skype en_gcarabat

thank you

IN YOUR ZONE 17

You might also like