Interview
Interview
NTRODUCTI
ON
1. Hi
,Iam _ __
___wor king asa sof t
war eEngi neerat_ ___
_______
_____
_____
___with___year
ofexper i
encei nsof twar eTest i
ng.
2.Ihadwor kedi ndi f f
erentdomai nssuchas_ _____
_____and_ _
_____
______
.
3.Ihav egoodex periencei ncore-Jav a.
4.AlsoIhav eex periencei nwebappl icati
ont esti
ngusingsel eni
um webdr i
ver
5.Iwor ked on dif f
erentf ramewor kssuch ascucumberwi t
h Junit,TestNG wit
hint
egrat
ion
ofPageObj ectmodelandDat a-Drivenf ramewor k.
6.Incucumber, Iam goodi ncr eatingf eaturef i
leandst epdef i
nit
ionfil
e
7.AsamanualTest erIam goodi ncr eati
ngt estcases
8.Ihav egoodex periencei nhandlingt oolslike
a.Mav enasbui l
dManagement ,
b.GI Tassour cecodeManagement ,
c. JenkinsasCont i
nuousi ntegr ati
ont ooland
d.JI RA asdef ectManagementt ool.
9.InJI RA,Iam goodi nr aisingdef ectsandt rackittot heclosure
10.Ihadwor kedonbot hwat erf
allandAgi l
emet hodologi
es
11.I
nAgi l
eIwi llbeact i
v el
ypar ti
cipatei nAgilecer emoniesl i
ke
a.spr intgr oomi ng,
b.spr intplanni ng,
c. sprintrev i
ew,
d.spr intret r
ospect i
veanddai l
yst andup.
1. Analyzi
ngt heuserst ories
2.Based on t he accept ance cr i
teri
a Iwi l
ldo f easi
bil
ity check.thati s whatal lthe part
goingt odobyaut omat ionandmanual .
3.Then Iwi llcr eatet he t estcases f ormanualt esti
ng and f eatur
ef il
ef oraut omati
on
testi
ng.
4.Al soIwi l
lpr eparet estdat a.
5.OnceIcompl etescr ipti
ng,Iwi l
lreview itf rom t helead.
6.Af terget t
ing rev i
ewed Iwi l
lst ar
tt he ex ecuti
on and anal y
z ethe reportfordef ectand
fail
ure.
7.I fanyscenar ioget t
ingf ai
ledIwi llraisethedef ectandassi gnitt othedev eloper
.
8.Oncet hedev eloperf ixt hebugIwi llber etesti
ngi tandv eri
fythebugi sf i
x ed.
9.I fthe bug i sf i
xed Iwi llcl ose the storyt o done st at
us,I fitis notf i
xed Iwi llagai
n
assigni ttot hedev eloper.
10.Ondai lybasi sIwi l
lpushmycodet omybr anch.
11.Oncet heuserst orycompl eted Iwi l
lpush i ttot hebr anch and givepullr equesttothe
branch.
12.Also Iwi l
lpr epar e defectl og and ex ecution resultwith screenshotand then Iwi llmail
thoser eportst ocl i
entonweekl ybasi s.
1
DAI
LY ACTI
VITI
ES
CHALLENGES FACED
Ini
ti
all
yWhen Iwasj oi
ned asa Fresher
,Iwasnotf ami
l
iarwit
h domain,so Istruggl
ed lotin
prepar
ing t
estcases.Laterwhen Iwasf ami
l
iari
n Domai
n Knowledge,Ican abl
et o wri
tetest
cases.
The majorchal l
enge Ihavefaced in my proj
ectist i
me outissue.Due to networkissue or
delayloading manyoft heTestexecuti
on gotfai
led bythr
owing No such elementexcept
ion.I
avoided t
hoseex cept
ionsbyusing wait
sconcepther e.Istar
ted usi
ng i
mplicitwai
taswel las
Expli
citwait.
Ini
ti
all
y we used dr i
ver
.navigat
e()
.t
o() method for l
aunchi
ng ur
l.At the t
ime the executi
on
conti
nuesev en t
he page isn’
tloaded complet
ely
.So afterwe st
art
ed usi
ng dr
iver
.get
()method
forlaunchi
ngurl.
2
JENKI
NS
PAGEOBJECT MODEL[
POM]
Thedesignapproachweareusinginourpr oj
ectisPageObjectModel. Wehav eimpl
emented
encapsul
ati
oninPOM byusing POJO cl
ass.Pojo cl
assi
sused to st
orelocat
orsinpagewi se.
Wear ehav i
ngmanynumberofpagesi nourpr oj
ect
.Foreachpagewewi l
lmaintai
nlocat
orin
dif
fer
entPojocl
ass.
Hereinthe pojo cl
ass we wi
lldecl
are orweb el
ementas pr
ivat
e and usi
ng get
ter
s we can
accessourpri
vatewebelement
sinotherclass.
In poj
o class we have a constr
uct
or. Because we ar
e using Pagefact
ory cl
ass i
n t
he
const
ruct
or.The main pur
pose ofthe Page fact
oryist
o capt
ure bul
k ofwebelement
s.Al
so
wehav eannotat
ionsl
ike@Findby
,@Findbys,@FindAl
l.
Then we ar
e usi
ng i
nit
Elementmet
hod i
nt he Pagef
act
ory cl
ass whi
ch i
s used t
ore-
ini
ti
ali
ze
thewebel
ementtoavoidstaleel
ementr
efer
enceexcepti
on.
3
Fr
amewor
kExpl
ainat
ion
Wehav eimplement
ed ourcucumberfr
amewor ki nthemav en.Fi
rstwewi l
lcreat
eHookscl ass
where we use @Befor
e and @After annot
ations whi
ch willexecut
e bef
ore and aft
er each
scenar
io,weusedtohav el
aunchbrowserscriptin@Bef or
eandqui tebr
owserscripti
n@Af ter
.
Then we willcreat
e base cl
ass wher
e we mai
ntai
n al
lresuabl
e codes l
i
ke sendkey
s,
cl
i
ck,scr
oll
-up,scr
oll
-downetc.
Then we wi
llcreatefeatur
ef il
ei n src/t
est
/resources.Int he f
eatur
efil
e we willadd
Featur
e and Scenar
io usi
ng Gherki
n Key words li
ke Given,when,And,Then,Feat ure,Scenari
o,
Scenari
o outl
ine,Examples,Background etc.Once t
he f eaturefil
ei s creat
ed we willcreat
e
TestRunnercl
asswhereweuset woannot ai
onsuchas@Runwi t
hand@cucumber opti
ons.
Thecucumberopt
ionswear
eusi
ngar
eFeat
ure,Gl
ue,Monochr
ome,dr
yRun,Tags,Pl
ugi
n,
sni
ppet
s,st
ri
ctetc.
Feat
uresOpti
onisusedt oconnectfeat
uref i
l
ewit
htestr
unnercl
assandgl
ueopt
ioni
s
usedt
oconnecttestrunnercl
asswit
hst epdefi
nit
ion.
Onceweex ecut
et hetestRunnercl
asssni
ppet
swillbegenerat
ed int
heconsolewhi
ch
i
scall
ed skelet
on script
.Thenwecopyi tandpasteiti
nthestepdefi
nti
onclassandwewill
wri
teourscr
ipti
ngpart
.
We int
egr
atet hi
sstepdef
int
ion cl
asswith basecl
assalso wi
th POJO cl
ass..Pojo cl
ass
i
sused to st
orelocator
sin page wise.We are havi
ng manynumberofpages i n ourpr
oject
.
Foreachpagewewi l
lmaint
ainlocat
ori ndi
ff
erentPojoclass.
Hereinthepojo cl
asswewi l
ldecl
areorweb el
ementaspr
ivat
eand usi
ng get
ter
swe
canaccessourpr
ivat
ewebelement
sinothercl
ass.
I
n poj
o cl
ass we have a const
ruct
or.Because we ar
e usi
ng Pagef
act
ory cl
ass i
nthe
const
ruct
or.Themain purposeoft hePagefactor
yi stocapt
urebulkofwebel
ements.
4
AI
RLI
NEDOMAI
N
Af
tersel
ecti
ng t
he f
li
ghtthe page wi
l
lbe navi
gat
ed t
othe Passengerdet
ail
s page.I
n
t
hatpageIshouldent
erFir
stname,lastname,phonenumber
,emai
laddressetc.
Then Iwil
lbemov
ing t
o Seatsel
ect
ion page.Her
eIcan sel
ectt
heseatbased on t
he
comf
ort
.Foll
owingtot
hepagewehav eluggagepage.
I
ntheluggagepagewecan add ourextr
aluggagesi
ncl
udi
ng pet
s,speci
alequi
pment
s.
Al
sowecanaddspeci
alassi
stance,addmealet
c.
Onconti
nui
ngt
hel
astpagewi
l
lbePay
mentpage.Icanei
therpayei
therbycr
edi
tcar
d
orof
fl
inebanki
ng.
Maven
Wit
ht he hel
p ofmav en goal,t
hatis cl
ean-i
nstal
l
-r un al
lthe r
equi
red j
arfi
les wil
lbe
aut
omati
cal
ly downloaded and i
n case ok any ver
sion update we can change t
he v er
sion
numberi
nt hedependencyf i
lei
sal oneneeded.
Al
so mav en gi
ves good f
olderstr
uct
ure such as src/test
/Java where we wi
l
lwr i
te our
scri
ptssrc/
test
/resour
ceswher e we wi
llmaintai
n ourresourcesf il
esl i
ke f
eatur
esfi
les,r
eports
etcandDependencyl i
brar
ies,andthentheex ecut
ionstart
sf rom pom. xmlfil
e.
I
nt he pom.
xmlf i
le onl
y we ar
e goi
ng to add dependenci
es l
i
ke Sel
eni
um Jav
a,Apache Poi
,
CucumberJava,CucumberJunit
,JVM repor
ti
ng.
5
GI
T
POM
Hereinthepojo cl
asswewi l
ldecl
areorweb el
ementaspr
ivat
eand usi
ng get
ter
swe
canaccessourpr
ivat
ewebelement
sinothercl
ass.
I
n poj
o cl
ass we have a const
ruct
or.Because we ar
e usi
ng Pagef
act
ory cl
ass i
nthe
const
ruct
or.Themain purposeoft hePagefactor
yi stocapt
urebulkofwebel
ements.