Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

 

Software Testing &


Introduction to Test
Automation
Prepared By: R K Singh
 

Agenda
 

Brief Intr
Introduction
oduction
Who am I?
! "ears of IT
#$perience
 IST%B Adanced and 'ST#
'erti(ed
My Roles so far-

Software Developer) Developm


Development
ent Tester
ester,,
Test Lead, Trainer- Teaching
 Teaching T** and
Automation Testing
Advisor-Assesses pro+ects and Too,s for Test
Automation
 

I-TR.*/'TI.- .0 T#STI-1
What is Testing: Software testing is the process of
ea,uation of a software item to detect di2erences
3etween actua, and e$pected output on gien input4

Software Testing is the process of assuring that


product which is manufactured 3y dee,oper is
meeting the user re6uirement4 The motie to
perform testing is to (nd the 3ugs and ma7e sure
that they get ($ed4
 The purposes of testing ar
are:
e:

%ua,ity assurance) 5eri(cation and 5a,idation)


 To
 To (nd the 3ugs 3efore
3efore the product
product is re,eased
re,eased to
customer4
 To
 To impr
improe
oe the 6ua,ity
6ua,ity of the product
product
 To
 To ea,uate th
that
at the product
product is according
according to
re6uirements4
 

 T"P# .0 T#STI-1

• Manual testing:  This type inc,udes the testing of the Softwa


Software
re
manua,,y i4e4 without using any automated too, or any script4
• A manual tester would typically perform the following

steps
 –
for manual
/nderstand testing:
the functiona,ity of program
 – Prepare a test enironment4
 – #$ecute test case8s9 manua,,y
 – 5erify the actua, resu,t
 – Record the resu,t as Pass or 0ai,
 – a7e a report of the Pass and 0ai, test cases
 –

Pu3,ish the report


 

W;. A-* W;#- T. START T#STI-1

• ho does testing: 0o,,owing professiona,s are ino,ed in


testing of a system within their respectie
respectie capacities:
 – Software Tester
 – Software *ee,oper
 – Pro+ect <ead=anager
 –
#nd /ser
• hen to Start Testing!
•  Testing
 Testing is done in di2erent
di2erent forms
forms at eery phase of S*<' ,i7e
during Re6uirement gathering phase) the ana,ysis and
eri(cations of re6uirements are a,so considered testing4
 

Pros
Pros > 'ons
• Advantage:-
 –anua, testing can 3e use in 3oth sma,,
sma, , and 3ig pro+ect4
 –We can easi,y reduce and add our test case according to pro+ect moement4
 –#asy to ,earn for new peop,e who enters in manua,
m anua, testing4
 –

anua, testing is more re,ia3,e then automated 8in many cases automated test
not coer a,, cases9 4

• Disadvantage:-
 – 1/I o3+ect sie di2erence and co,or com3ination etc is not easy to (nd out in

manua, testing4
 – Actua, ,oad and performance is not possi3,e to coer in manua, testing for ,arge
num3er of users4
 

Automation testing
• Automation testing: Automation testing which is a,so 7nown as
 Test
 Test Automation4 In this testing) the tester writes scripts and uses
another software to test the software4 There are many Too,s are
use in automation Testing4

• tools:
Software testing tools:
 – ;P %uic7 Test Professiona,
 – Se,enium
 –  Test
 Test stac74White
 –  Testing
 Testing Anywhere
 – WinRunner
 – <aodRunner
 

Pros
Pros > 'ons
• Advantages
 – #asy to coer up a,, cases in a ,imited time period4
 – "
 "ou
ou can perform di2erent
di2erent types of te
testing@s
sting@s ,i7e ,oad testing)
performance testing using too,4
 – Automated testing can 3e performed on di2erent operating systems4

• Disadvantages
 – Purchase a too,s and aintenance4
 – Automation testing is more e$pensie wor7 as comparing with manua,
testing4
 – <anguage wise there are many too,s to test arious
 arious type of software)
means a,, too,s wi,, not support to a,, software which are dee,oped in
di2erent ,anguages4
 

S*<' A-* ST<'

• Software Development • Software Testing Life


"ycle: There are si$
Life "ycle:  There
"ycle: Ther
"ycle: e are seen type
type of S*<'4 of ST<'4
 – Re6uirement
Re6uirement phase  – Re6uirement
Re6uirement Study
 – *esign phase  –  Test
 Test P,anning
 – 'oding 8programming9  – Writing Test 'ases
 –  Testing
 Testing  – Reiew the Test 'ases
 – Re,ease 8Production9  – #$ecuting the Test 'ases
 – aintenance 8Support9  – Bug ,ogging
 – ',ose or Reopen 3ugs
 

BASI' T"P# .0 T#STI-1

• #lac$ #o% Testing:  The techni6ue of testing without haing any


7now,edge of the interior wor7ings of the app,ication is B,ac7 Bo$ testing4
 The tester is o3,iious to the system architecture and does not hae
access to the sourc
sourcee code4 It is a,so ca,,ed 3ehaiora,) functiona, and
c,ose 3o$ testing4

• hite #o% Testing: White 3o$ testing is re6uire understanding of


interna, ,ogic and structure of the code4 White 3o$ testing is a,so ca,,ed
g,ass3o$ testing or open 3o$)
3o$) structura,)c,ear3o$ testing4

• Di&erent types of software testing:


 –/nit testing
 –Smo7e testing
 

continue

• 0unctiona, testing •  Performance testing


• Integration testing • /ser acceptance testing
• Regression testing • B,ac7 3o$ testing
• System testing • White 3o$ testing
• <oad testing • A,pha testing
• Stress testing • Beta testing
 

SAP<# .0 T#ST 'AS# A-* B/1 <I0#


'"'<#
Sample of Test case:
Test Test 'npu (%pec Test Remar
"ase "ase t ted Res $s
'D Descrip Data Result ult
tion

"ycle:  There are si$


#ug Life "ycle: There si$ phases
of Bug <ife cyc,e4
  a4 -ew
  34 Assigned
  c4 Reso,ed
  d4 5eri(ed
eri (ed
  e4 ',osed
  f4 Reopen
 

Sample of #ug :
  #ug )ame: App,ication crash on c,ic7ing the SA5# 3utton4
  #ug 'D: 8It wi,, 3e automatica,,y created 3y the B/1 Trac7ing too, once you sae this
3ug9
  Area *ath: /S#RS menu C -ew /sers
  Severity: ;igh 8;igh=medium=<ow9
  *riority: ;igh 8;igh=medium=<ow9
  Assigned to: *ee,oper>D
  Reported #y:  "our
 "our -ame
  Reported +n: *ate
  Reason : *efect
  (nvironment: Windows EFFG=S%< Serer EFFH
 

Bug detai,scontinued
• Severity: *escri3es the 3ug in terms of functiona,ity4
Severity: *escri3es
• *riority: *escri3es the 3ug in terms of customer4
*riority: *escri3es
• #$4
 –

igh *riority and Low Severity: 'ompany ,ogo is not proper,y disp,ayed on
their we3site4
 – igh *riority and igh Severity: Suppose you are doing on,ine shopping and
(,,ed payment information) 3ut After su3mitting the form) you get a message
,i7e .rder has 3een cance,,ed4
 – Low *riority and igh Severity: If we hae a typica, scenario in which the
app,ication get crashed) 3ut that scenario e$ists rare,y4
rare,y4
 – Low *riority and Low Severity:  There is a mista7e
mista7e ,i7e "ou
"ou hae registered
success instead of successfu,,y) success is written4
 

Windows Application Automation


using WHITE Framework
 

)eed for Automation in any indows


Application
Type of testing tasks that are routine while doing Verifications.
Verifications .

• Repetitive
Repetitive and Multiple actions as a part of Functional
testing
• Parallel
Parallel verifications in third party applications
• Post every deployment in the environment, smoke tests to
have health check.
ome g on
 

0ramewor7
 0ramewor7 for automating rich c,ient app,ications 3ased
  K
  R 
  T  E  E  W  O
  I on WinGE=Win
WinGE=Win 0or
0orms=WP0=
ms=WP0= Si,er,ight) Jaa p,atforms
  H
  W  R  A  M
  F
 4-#T 3ased and does not re6uire the use of any

proprietary scripting ,anguages

 .pen Source

 'ustom 'ommands) 'ustom 'ontro,s and performs

comp,e$ actions of any windows app,ication

 Integration with S#<#-I/ is hass,e free 

 Browse for more http:==teststac74githu34io=White=


 

'ont44
 

 Time for a *emo


 Time *emo

Lets have a !emo""


 

Some ,ight on Se,enium


 #e$ testing framework

 Runs in a $rowser

 %TML & 'ava script

 (pen )ource

 *rowse for more+ http--opena.org

 )elenium is a ro$ust set of tools that supports rapid development of test automation
for we$+$ased applications.
 )elenium operations are highly fle/i$le, allowing many options for locating 01
elements and comparing e/pected test results against actual application $ehavior
$ehavior..
ome g on e en um
 

Selenium 0eatures
."ontinued/

Supports 'ross Browser Testing4 The Se,enium tests can 3e run on mu,tip,e 3rowsers4

• A,,ows scripting in seera, ,anguages ,i7e Jaa) 'L) P;P and Python4

• Assertion statements proide an eMcient way of comparing e$pected and actua,

resu,ts4

• In3ui,t reporting mechanism4

Selenium 0lavors

• Se,enium I*#

• Se,enium Remote 'ontro,

• Se,enium We3driers
 

Se,enium@s Adantages oer other


too,s
 Multiple 1rowser support .supports almost all

1rowsers/

 (ase in "ustom "ontrol 'denti2cation

 Test play1ac$ is very fast3

 4ery easy to get your initial tests running3


 ighly in-1uilt interface and 5ood wor$6ow since it
is
visi1le side-1y-side with your 1rowser3

 Test script is easily reada1le7understanda1le


 Tests can 1e e%ported in many di&erent

programming languages
 

0ew 'ommon 'ha,,enges during


Automation

'ustom 'ontro,s identi(cation was diMcu,t

 Browser compati3i,ity Issues4

  T
 Too,
oo, tips were
were not recognied4
recognied4

 aintaining the sing,e /I ap was a 3it diMcu,t4

 0ew contro,s were recognied on the 3asis of


coordinates on the 3rowser which is not supporting our
scripts on di2erent screen sies4
 

Steps to start with Se,enium

.R"/ 
Selenium Remote "ontrol .R"/ 

• Download and add Thought


Thoughtor$s3Selenium3"ore
or$s3Selenium3"ore dll to "8 solution

• Download Run Selenium server in your system

• "reate a test script in "8 and run it3


e en um es u oma on
 

*rocess

• .nce the Se,enese script is


conerted into your preferred
,anguage you can run them using

Se,enium Serer4
• 0or running the script you a,so
need the c,ient drier for that
particu,ar ,anguage4
 

4ersions Selenium 'D( Selenium Selenium Selenium


#rowsers Remote "ore 97e1 driver
"ontrol A*'

00N4$> .n,y
00OF>$ Record &
P,ay3ac7

'( 7;7<
Safari
E=G=N=H
 

4ersions Selenium 'D( Selenium Selenium Selenium


#rowsers Remote "ore 97e1driver
"ontrol A*'

"hrome
v =- v ><

  Se,enium 'ore is written in Jaa script so it shou,d wor7 8in theory9 on most 3rowsers with
decent Jaa script support4 Some operations are on,y possi3,e ia Se,enium Remote 'ontro,
3ecause of 3rowser security settings
 Se,enium Remote 'ontro,
'ontro, serer can start any e$ecuta3,e) 3ut depend
depending
ing on 3rowser security
settings) there may 3e technica, ,imitations that wou,d ,imit certain features4

+pera
;7<7>?
 

And Some <imitations



-o support for https  on 1oog,e chrome in Se,enium4
https on
 Se,enium is on,y for We3 Test Automation

 Sometimes issues with o3+ect identi(cation

Resources

  "
 "ou
ou can chec7
chec7out
out for more
more detai,s of Se,enium at :

http:77www3open@a7org7selenium
 

Demo Time!!
Lets have a !emo""
 

2ueries-)uggestions+ Lets discuss

You might also like