4

Click here to load reader

Single entry, Single exit - Singular purpose

Embed Size (px)

DESCRIPTION

This article from STAG Software was published in the Jan 2012 issue of Tea Time with Testers, ezine. The article emphasis that a test scenario with a clear goal results in a 'singular purpose' script that satisfies the key attribute of 'single entry-single exit' to enable you evolve with least pain.

Citation preview

Page 1: Single entry, Single exit - Singular purpose

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!

!

!

!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!

!

!

!!

!

!

!!

!

! !

!

!!!

Page 2: Single entry, Single exit - Singular purpose

!!

!!!"""#!"#!$%"&$!'!"(!")(*+,%!!!!!!!!!!!!!!!!!!!!!!!!!--------------------------------------------------------!!!!!$%&'%()--./0.13/!!

!

!

!

!

!

!

!

!

!

!

!

!

!

*L$*H)+!"*%'B<!L$*H)+!"/$%!!D!L$*H2)('!02'-&:+!

!!

!!U'&75/>&%0! %'5>8%5/>&! /1! 1--&! %1! %! <-)! -&%90-(! .>(! 4>>3! 5-15/&4;! -1=-7/%00)! %5! %! =(>3'75X%==0/7%5/>&!0-,-0#! G/4&/./7%&5! 8>&-);! 5/8-;! -..>(5! %(-! 1=-&5! 5>! -&1'(-! "-! 7%&! 3>! .%15-(;! 72-%=-(! %&3! 9-55-(!! 9)!0-,-(%4/&4!5-72&>0>4)!5>!3>!8>(-#!A2/1!/1!'1'%00)!%9>'5!72>>1/&4!5>>01;!3-,/1/&4!%(72/5-75'(-X.(%8-">(<!%&3!52-&!7(%&</&4!>'5!%'5>8%5/>&!7>3-#!!!

!L&3!52-&!"-!3/17>,-(!52-!/7-@9-(4q!52%5!"-!2%,-!5>!72%&4-!7>3-!5>!9-!1)&7!"/52! -,>0,/&4! 1>.5"%(-! /#-#! "-! &--3! &>&@5(/,/%0! /&,-158-&5! 5>! 8>3/.)!%'5>8%5-3!17(/=51!%&3!>'72! /5! /1!%!=%/&m!G>;!"2)!3>-1! /5!9-7>8-! %!=%/&l!N-7%'1-!>.!52-!7>8=0-M/5)!>.!17(/=5l!G>!"2%5!7>&5(/9'5-1!5>!52-!7>8=0-M/5)l!!!!!!!!!!!!!A2-!,%(/-5)!>.!7>&3/5/>&1!/&!52-!17(/=5!5>!72-7<!52-!,%(/-5)!>.!9-2%,/>(1#!!!!L1!%! 7>&1'05%&5!"2-&! *!-M%8/&-!-M/15/&4!%'5>8%5/>&!17(/=51;! *! %8!%0"%)1!%8%C-3!%5!2>"!8'72!1>8-!>.!52-!%'5>8%5/>&!7>3-!5(/-1!5>!%77>8=0/12#!*&!%!(-7-&5!-&4%4-8-&5!"2/0-!-M%8/&/&4!52-!%'5>8%5/>&!7>3-!>.!%!=(>3'75!"/52!(/72!9(>"1-(@9%1-3!OY*;!*!3/17>,-(-3! 52%5! 52-!%'5>8%5-3!17(/=5! 72-7<1! .>(!3%5%!9>'&3%(/-1;!3-.%'05!,%0'-1!>.!/&='51;!7>&5(>0!-&%90/&4X3/1%90/&4;!7>&5(>0!

Page 3: Single entry, Single exit - Singular purpose

!!

!!!"""#!"#!$%"&$!'!"(!")(*+,%!!!!!!!!!!!!!!!!!!!!!!!!!--------------------------------------------------------!!!!!$%&'%()--./0.130!!

=(>=-(5/-1;!%&3! 52-&! .'&75/>&%0!9-2%,/>(#!! *! %8!1'(-! 52%5!)>'!7%&!,/1'%0/C-! 52-!,%(/>'1! 7>&3/5/>&1! 5>!72-7<! .>(!%&3! 52-!%11>7/%5-3! 0>&4!7>3-! 52%5! /1! (/72! /&!=>5-&5/%00)!'&7>,-(/&4!%!,%(/-5)!>.! /11'-1#!!A2-!3-,-0>=-(!>.!52-!17(/=5!/1!=(>'3!>.!2>"!8'72!2-X12-!2%1!=%7<-3!/&5>!52-!17(/=5!"2/015!*!%8!18/0/&4!%&3!7(/&4/&4!/&"%(30)#!! !!B-! %1! 2'8%&! 9-/&41! 2%,-! %&! %8%C/&4! %9/0/5)! >.! 3-%0/&4! "/52! ,-()! 8%&)! 52/&41! %5! 52-! 1%8-! 5/8-#!\-=0/7%5/&4! 52/1! /&! %! 8%72/&-! /1! &>5! -%1)#!! *5! /1! &-7-11%()! 5>!9(-%<! %! 7>8=0-M! %75/,/5)! /&5>! 8'05/=0-!

!!B2%5!3>-1!52/1!/&,>0,-l!!

!G>! "2-(-! %(-! "-! 4>/&4! "/52! 52/1l! \-3'7-! 52-! 7>8=0-M/5)! >.! .'&75/>&%0! 17-&%(/>1! 52%5! %(-! 9-/&4!%'5>8%5-3!9)!3-7>8=>1/&4!52/1!/&5>!18%00-(!1/&40-@8/&3-3!17-&%(/>1#!A%</&4!52-!%9>,-!9(>"1-(@9%1-3!=(>3'75!%1!%&!-M%8=0-;!"-!7%&!1--!52%5!52/1!/1!%! 7>00-75/>&!>.!18%00!17(/=51!DZI!.>(!>&0)! 72-7</&4!3%5%!9>'&3%(/-1! D[I! 5>! 72-7<! 52-! 7>&5(>0! =(>=-(5/-1! D]I! 52/(3! .>(! 72-7</&4! .'&75/>&%0! 9-2%,/>(! %&3! 1>!>&#!B2%5!%(-!"-!3>/&4l!N-/&4!1/&40-!8/&3-3!@!DLI!B(/5/&4!17(/=51!52%5!%(-!.>7'1-3!>&!'&7>,-(/&4!>&-!D>(!,-()!.-"I!5)=-1!>.!=>5-&5/%0!3-.-751!DNI!V&1'(/&4!52%5!-%72!17-&%(/>!2%1!>&0)!>&-!</&3!>.!9-2%,/>(!/#-!>&-!5)=-!>.!>'5='5#!!!!R>/0%;!52/1!8-%&1!52%5!17(/=5!2%1!8/&/8%0!7>&3/5/>&1!/&!52-!7>3-!%&3!2-&7-!/5!/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!WNA!DW)=>52-1/1!N%1-3!A-15/&4I;!52/1!/1!

!!"/52!! @!

!B-!&>"!2%,-!17-&%(/>1!52%5!%(-!1/&40-!8/&3-3!/#-#!.>7'1-3!>&!./&3/&4!%!=>5-&5/%0!3-.-75!5)=-;!%!17-&%(/>!3-./&-3! %&3! '&3-(15>>3! %1! %! 1/&4'0%(! 9-2%,/>(! (-1'05/&4! /&! %&! >'5='5#!B2-&! "-! 7>&,-(5! 52-1-! /&5>!

@ ! A2/1! /1! %! 17(/=5! "/52! 52-! 0-%15! 1-5! >.!!!

!*5! /1!>.5-&!%11'8-3!52%5!%!4>>3!.(%8-">(<! /1!%!4>>3!-&>'42!.>(!9'/03/&4!.0-M/90-!17(/=51#!A2/1!/1!5('-;!9'5! (-=(-1-&51! >&0)! 2%0.! 52-! 15>()#!! A2-! >52-(! /8=>(5%&5! 2%0.! /1! 52-! 15('75'(-! >.! %! 17-&%(/>! %&3! /51!

!!17(/=5!5>!9-!! @ !!!L1! "-! 1%"! /&! 52-! 6-7! [_ZZ! 7>0'8&! !! 7>8=0-M/5)! /1! %&! -&-8)! %&3! .(/-&3#! L&!-&-8)! 9-7%'1-! /5! 7%&! .%C-! )>';! .(--C-! )>'(! 52>'4251! %&3! &'89! )>'#!! L! .(/-&3! 9-7%'1-! /5! 3-=/751!(/72&-11;!52-!%9/0/5)!5>!3>!,-()!8%&)!52/&41#!A2-!5(/7<! /1!5>!9-!(/72!D0-,-0@/C-3I!!9'5!&>5!9-!.%C-3!9)!/5!D1/&4'0%(I#!!!

Page 4: Single entry, Single exit - Singular purpose

!!

!!!"""#!"#!$%"&$!'!"(!")(*+,%!!!!!!!!!!!!!!!!!!!!!!!!!--------------------------------------------------------!!!!!$%&'%()--./0.13.!!

;!9:?&4! /1!52-!U>'&3-(! s!HV:!>.!GALO!G>.5"%(-!S(/,%5-!K/8/5-3#!'S%11/>&%5-! %9>'5! -M7-00-&7-;! 2/1!8/11/>&! /1! 5>! /&,-&5! 5-72&>0>4/-1!

!!

!!W-!7%&!9-!(-%72-3!%5!(:?i:%(H:&5%,('+S3&M . -

!!

L! 70-%(!4>%0! .>7'1! 12%(=-&1! /&5-00-75#!!L! 17-&%(/>!

17(/=5!52%5!1%5/1./-1!>.!-&5()@=%/&#!!!G>!52-!&-M5! 5/8-!)>'!7>&,-(5!%! 17-&%(/>! /&5>!%&!%'5>8%5-3!17(/=5;!!

!!W%,-!%!4(-%5![_Z[#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!