Automation and Selenium: Author: Qu NHKT - Fsu1.Bu9

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

Automation and Selenium

Author: QunhKT FSU1.BU9

Agenda
Automation Overview
o
o
o
o
o

What is Automation?
Why automate?
Which Test Cases to Automate?
Which Test Cases to Automate?
Benefit and limitation

Selenium
o What is it?
o Selenium components

TestNG Overview
o What is TestNG?
o Why do we need TestNG in Selenium?
o Why do we need TestNG in Selenium?

Demo
2

What is Automation testing?


Manual testing is performed by a
human sitting in front of a computer
carefully executing the test steps.
Automation Testing means using an
automation tool to execute your test
case suite.
The automation software can also
enter test data into the System Under
Test , compare expected and actual
results and generate detailed test
reports.
3

Why automate
Manual Testing of all work flows, all
fields , all negative scenariosis time
and cost consuming
It is difficult to test for multi lingual
sites manually
Automation does not require Human
intervention. You can run automated
test unattended (overnight)
Automation increases speed of test
execution
Automation helps increase Test
Coverage

Which Test Cases to Automate?


High Risk - Business Critical test
cases
Test cases that are executed
repeatedly
Test Cases that are very tedious or
difficult to perform manually
Test Cases which are time
consuming

Which is not suitable for automation


Test Cases that are newly designed
and not executed manually at least
once
Test Cases for which the requirements
are changing frequently
Test cases which are executed on adhoc basis.

Benefits and limitation


Benefit
Regression test on a new version
Run more test more often
Difficult to do manually
Big data cases
Optimize resources
Increase confidence
Limitation
Cant replace manual testing
Find less bugs than manual test
Maintenance time may be more costly than
manual test
Technical problem

Automation test process


Test case
Scripting

Automation Script

Execution

Test Report

Selenium
What is it?
Selenium component

Selenium What is it?


Developed by ThoughtWorks and
Google
Selenium is a set of tools to
automate web application testing
across many platforms.
Selenium runs in many browsers and
operating systems.
Support many languages, including
Ruby, Python, Java, c# and so on
Selenium is an Open Source project.
The code can be modified and

Selenium Components

Selenium IDE
Selenium RC
Selenium Grid
WebDriver (Selenium 2.0)

11

Selenium IDE
Selenium IDE (Integrated
Development Environment) is the
simplest tool in the Selenium Suite.
It isa Firefox add-on that creates
tests very quickly through its recordand-playback functionality

12

Selenium IDE

13

Selenium RC
Allows you to write automated web
application UI tests in any programming
language against any HTTP website using
any mainstream JavaScript-enabled browser.

14

Selenium RC

15

Selenium WebDriver
WebDriver is a web automation
framework that allows you toexecute
your tests against different
browsers, not just Firefox (unlike
Selenium IDE).
WebDriver also enables you touse a
programming languagein creating
your test scripts(not possible in
Selenium IDE).

16

Selenium Webdriver

17

Selenium Grid

18

Selenium Grid
Allows you run the tests on different
machines against different browsers in
parallel; in other words it enables
distributed test execution.
Run your tests against different
browsers, operating systems, and
machines all at the same time.
Save time in execution of your test
suites.

19

What is TestNG?
TestNG is an open source automated
testing framework; where NG of
TestNG means Next Generation.
TestNG is similar to JUnit (especially
JUnit 4), but its not a JUnit extension.
Its inspired by JUnit. It is designed to
be better than JUnit, especially when
testing integrated classes.

20

Advantages of TestNG over JUnit


There are three major advantages of
TestNG over JUnit:
Annotations are easier to understand
Test cases can be grouped more easily
Parallel testing is possible

21

Advantages of TestNG over JUnit

22

Why do we need TestNG in Selenium?


TestNG can generate reports based
on our Selenium test results.
WebDriver has no native mechanism for
generating reports.
TestNG can generate the report in a
readable format like the one shown below.

23

Why do we need TestNG in Selenium?


TestNG simplifies the way the tests are
coded
There is no more need for a static main
method in our tests. The sequence of
actions is regulated by easy-tounderstand annotations that do not
require methods to be static.
Uncaught exceptions are automatically
handled by TestNG without terminating
the test prematurely. These exceptions
are reported as failed steps in the report.
24

25

26

Thank you!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy