Upload
shaikameermalik
View
214
Download
0
Embed Size (px)
Citation preview
8/18/2019 ExtentReport Review
1/13
ExtentReport Review(by: Rogelio “CAGS” Caga-anan Jr.)
Comparion between
- extentreport-!ava-".#$%.!ar
an&- extentreport-!ava-".'.!ar
8/18/2019 ExtentReport Review
2/13
Pseudocode
veriy*+e,orow /etparent 0 report.tart/et(1veriy*+e,orow121veriy t3at t3e *+e worow+n4tion a expe4te&1)5
4reate 43il& report - 6ogin 43il& 0 report.tart/et(16ogin1)5
log 43il& tep re+lt
43il&.log(6ogStat+.7ASS21type +ername121891)543il&.log(6ogStat+.7ASS21type pawor&121891)543il&.log(6ogStat+.7ASS214li4 login121891)543il&.log(6ogStat+.7ASS21veriy lan&ing page121891)5
appen& t3i 43il& parent.appen&C3il&(43il&)5
4reate 43il& report - Goto one 43il& 0 report.tart/et(1Goto one1)5
log 43il& tep re+lt43il&.log(6ogStat+.7ASS21ele4t one121891)543il&.log(6ogStat+.7ASS214li4 login121891)543il&.log(6ogStat+.7ASS21veriy lan&ing page121891)5
appen& t3i 43il& parent.appen&C3il&(43il&)5
4reate 43il& report - Sele4t /ra&e Appli4ation 43il& 0 report.tart/et(1Sele4t /ra&e Appli4ation1)5
log 43il& tep re+lt43il&.log(6ogStat+.7ASS21ele4t Appli4ation121891)543il&.log(6ogStat+.7ASS214li4 89121891)543il&.log(6ogStat+.7ASS21veriy lan&ing page121891)5
appen& t3i 43il& parent.appen&C3il&(43il&)5
4reate 43il& report - 6ogo+t
43il& 0 report.tart/et(16ogo+t1)5 log 43il& tep re+lt43il&.log(6ogStat+.7ASS214li4 Exit121891)543il&.log(6ogStat+.7ASS214li4 6ogo+t121891)543il&.log(6ogStat+.7ASS21veriy lan&ing page121891)5
appen& t3i 43il& parent.appen&C3il&(43il&)5
bae& on t3e logStat+ o t3e 43il& tep2 log tat+ a parent tet tat+parent.log(6ogStat+.7ASS21veriy *+e ,orow1217ASSE;1)5
report.en&/et(parent)5
veriyAmen&,orow /etparent 0 report.tart/et(1veriyAmen&
8/18/2019 ExtentReport Review
3/13
suedo code is meant to represent
7arent no&e - veriy*+e,orow/et - veriyAmen&,orow/et
a43 parent 3a ' 43il& no&e an& ao4iate& tep - 6ogin
- type +ername- type pawor&- 4li4 login
- veriy lan&ing page - Goto one
- ele4t =one- 4li4 o- veriy lan&ing page
- Sele4t /ra&e Appli4ation- ele4t Appli4ation
- 4li4 o- veriy lan&ing page
- 6ogo+t- 4li4 Exit- 4li4 6ogo+t- veriy lan&ing page
Ea43 7arent no&e 3a% 4all to tart/et()- parent 0 report.tart/et()A>;
% log repreenting t3e tat+ ot3e tet- parent.log(6ogStat+.7ASS2”7a”)
Ea43 ao4iate& tep i repreente& by alog- 43il&.log(6ogStat+.7ASS2”type+ername”2”89”)5Ea43 43il& no&e i appen&e& to parent- parent.appen&C3il&(43il&)5
Ea43 43il& no&e i repreente& by a 4allto tart/et- 43il& 0 report.tart/et()
8/18/2019 ExtentReport Review
4/13
Code Structure usingTestNG?/et (priority0%)
public void verifyIssueWorkow!"
parent 0 report.tart/et(1veriy*+e,orow12 1veriy t3at t3e *+e worow +n4tiona expe4te&1)5
inert 43il& no&e an& log
43il& 0 report.tart/et(“6ogin”)5 43il&.log(6ogStat+.7ASS2”type +ername”2”89”)5 : appen& 43il& parent.appen&C3il&(43il&)5
inert more 43il& no&e an& log a nee&e&
m+t &o a parent.log to 3ow &etail in +mmary view
if testStatus!" parent.log(6ogStat+.PASS, "verifyIssueWorkow", "Status: PASSED"); @ else " nee& to log t3i to parent i at leat % tet tep aile& parent.log(6ogStat+.FAIL, "verifyIssueWorkow", "Status: FAILED"); @
4loe t3e reportreport.en&/et(parent)5
or4e ail t3e tet i any tet tep ail if #testStatus!" Aert.fail(); @@
/et>G re4or& t3i a a /et24orrepon&ing to t3e 4o+nt in /etiew in v".#$%
/et>G re4or& t3i a t3e tat+ o t3e /et24orrepon&ing to t3e parent.log() in v".#$%
/et iew in v".#' 4o+nt allreport.tart/et() a a /et in /etiew
/et iew in v".#' t3e tat+ o t3eparent i bae& on t3e latR+nStat+ a een in t3e B+i4 /et
S+mmary an& not t3e no. o parent0 report.tart/et() 4all
/otal tet 4o+nt i bae& on t3en+mber o report.tart/et() 4all23en4e t3ere i alway an a&&itional
% tet 4o+nte& w3i43 i t3e parent0 report.tart/et() 4all intea& oonly 4o+nting 43il& 0report.tart/et() 4all
8/18/2019 ExtentReport Review
5/13
ing t%e code &sing e'tentreports()ava(*+,-.+)ar
%. B+i4 /et S+mmary ree4t4orre4t tat+ o parent(veriy*+e,orow veriyAmen&
8/18/2019 ExtentReport Review
6/13
'panding verifyIssueWorkow
C3il& >o&e repreenting 6ogiC3il& logStat+ -F 6ogin Step
C3il& >o&e tat+ itaen rom latr+nStat+
There are 13 steps forverifyIssueWorkowLogin has 4Goto Zone has 3Select Trae !pplicationhas 3Logout has 3
Steps "iew counts 14#incluing the aitional
step $entione a%ove
Stat+ taen romparent.logStat+()
/3i line i 4o+nte& a % tep poible
i&e ee4t w3en 4alling - parent 0report.tart/et()
8/18/2019 ExtentReport Review
7/13
'panding verify0mend1lowStat+ taen romparent.logStat+()
C3il& >o&e tat+ itaen rom lat
r+nStat+
/3i line i 4o+nte& a % tep a a
i&e ee4t o 4alling - parent 0report.tart/et()
1or v*+,-. 2 v*+,34 itwould be more accurateif t%ese are t%e onlyitems counted as teststepsW%ic% means t%ere
would be5.- steps4 .* passed4 .failed
S%ould be t%e same forverifyIssueWorkow
There are 13 steps forverify!$en&lowLogin has 4Goto Zone has 3Select Trae !pplicationhas 3Logout has 3
Steps "iew counts 14#incluing the aitionalstep $entione a%ove
8/18/2019 ExtentReport Review
8/13
ing t%e code using e'tentreports()ava(*+,3+)ar
.+ In 6uick TestSummary4 only7ogStatus used isreected
Steps "iewvalues is now thesa$e as the'uick Test "iew(
Still has )* stepstotal instea of
)+
Test "iew reectsthe no( of chilnoes instea ofthe no( of parentnoes
8/18/2019 ExtentReport Review
9/13
ing t%e parent nodes 8 verifyIssueWorkow and verify0mend1low4
Ree4te& in /et iew a %# tetD pae&2 " aile&
8/18/2019 ExtentReport Review
10/13
Comparing TestNG result wit%/'tent$eport using v*+,-.%. B+i4 /et S+mmary mat43e /et>G ?/et tat+". /otal time reporte& by ExtentReport an& /et>G are
imilar$. Stat+ o /et>G tet 4la mat43 wit3 t3e 4o+nt in
/et iew'. A&&itional R+n tat+ in&i4ate tat+ o lat
43il&.log() tat+
"
%
$
'
8/18/2019 ExtentReport Review
11/13
Comparing TestNG result wit%/'tent$eport using v*+,3
%. R+nStat+ mat43e /et>G ?/et tat+". /otal time reporte& by ExtentReport an& /et>G are
imilar$. Stat+ o /et>G tet 4la &oe not mat43 wit3 t3e
4o+nt in /et iew
%
"
$
8/18/2019 ExtentReport Review
12/13
8/18/2019 ExtentReport Review
13/13
Con4l+ion• Kot3 verion2 &epen&ing on inten&e& reporting 43ema2
4an be +e& in&epen&ently. En& +er wo+l& beneIt greatlyi t3e reporting 43ema i 4onIg+rable – S43ema % : 7arent no&e i 4o+nte& a tet (v".#$%)
– S43ema " : C3il& no&e i 4o+nte& a a tet (v".#')
• ;epen&ing on +er preeren4e2 +er mig3t expe4t t3at tetramewor +e& (ex. /et>G or J+nit) wo+l& 3ave t3e ame reportre+lt a ExtentReport
• Reviit /et Step 4o+nt to ree4t t3e a4t+al tet tep wit3o+ta&&ing t3e a&&itional tep t3at 4o+l& be bro+g3t abo+t by parent0 report.tart/et() an& appen&C3il&() met3o&