Outline of the Lecture Softwre Testing Lecture Notes 3 (of 4) Integrtion Testing Top-down ottom-up ig-ng Sndwich System Testing cceptnce Testing istriution of ults in lrge Industril Softwre System (ISST 2002) Jnury, 2007 US, S, Mrim Kmkr, I, LiU 1 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 2 Unit & Integrtion Testing Ojective: to ensure tht code implemented the design properly. ode = System esign Specifiction omponent code omponent code Unit Unit Tested components Tested components esign Specifiction Integrtion Integrted modules Jnury, 2007 US, S, Mrim Kmkr, I, LiU 3 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 4 omponents driver omponent to e ed oundry conditions independent pths interfce... stu stu Test cses Jnury, 2007 US, S, Mrim Kmkr, I, LiU 5 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 6 1
Top-down Stus for four components Jnury, 2007 US, S, Mrim Kmkr, I, LiU 7 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 8 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 9 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 10 Top-down Top-down Test Test Test Test Jnury, 2007 US, S, Mrim Kmkr, I, LiU 11 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 12 2
Modified Top-down Modified Top-down Test Test Test Test Test,,, Test,,,,,, Jnury, 2007 US, S, Mrim Kmkr, I, LiU 13 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 14 ottom-up river for five components Jnury, 2007 US, S, Mrim Kmkr, I, LiU 15 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 16 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 17 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 18 3
ottom-up Jnury, 2007 US, S, Mrim Kmkr, I, LiU 19 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 20 ottom-up ig-ng Test Test Test Tets Test Test Test Test Tets Test Test Test Tets Test Test Jnury, 2007 US, S, Mrim Kmkr, I, LiU 21 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 22 Sndwich Trget level,, Jnury, 2007 US, S, Mrim Kmkr, I, LiU 23 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 24 4
Sndwich Modified Sndwich Test Test Test,, Trget level,, Test Test, Test Test Jnury, 2007 US, S, Mrim Kmkr, I, LiU 25 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 26 Modified Sndwich omprison of Integrtion Strtegies Test Test Top-down Modified Top-own ottom-up ig-ng Sndwich Modified Sndwich Test Test,, Integrtion rly rly rly Lte rly rly Test Test Test, Test Time to sic working progrm river needed rly No rly Lte Lte rly rly Test Test Stus needed No Jnury, 2007 US, S, Mrim Kmkr, I, LiU 27 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 28 System Testing Steps unction ing / Thred ing Performnce ing cceptnce ing Instlltion ing Ojective: to ensure tht the system does wht the customer wnts it to do. ustomer System Testing eveloper Test utomtion Termintion Prolem Requirements definition Requirements specifiction unctionl requirements Nonfunctionl requirements Jnury, 2007 US, S, Mrim Kmkr, I, LiU 29 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 30 5
omponent code omponent code Unit Unit Tested components Tested components esign Specifiction Integrtion Integrted modules Integrted modules System functionl requirements unction cceptnce ustomer requirements spec. unctioning systems ccepted system Other softwre requirements Performnce Instlltion User environment Verified vlidted softwre System In Use! Jnury, 2007 US, S, Mrim Kmkr, I, LiU 31 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 32 unction ing/thred ing (ing one function t time) functionl requirements Threds: scenrio of norml usge stimulus/response pir ehvior tht results from sequence of system-level input n interleved sequence of port input nd output events sequence of tomic system functions (S) S: n tomic system function is n ction tht is oservle t the system level in terms of port input nd output events function checks tht the integrted system performs its function s specified in the requirement uidelines use tem independent of the designers nd progrmmers know the expected ctions nd output oth vlid nd invlid input never modify the system just to mke ing esier hve stopping criteri Jnury, 2007 US, S, Mrim Kmkr, I, LiU 33 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 34 use-nd-ffect-rph ( cse genertion from req.) cuses: inputs effects: outputs nd trnsformtions cuses-nd-effect grph: oolen grph reflecting cuses nd effects reltionships is forml lnguge into which nturl lnguge specifiction is trnslted sic cuse-effect grph symols c Identity: if then nd: if ( nd ) then c d Identity: if (not ) then c Or: if ( or or c) then d Jnury, 2007 US, S, Mrim Kmkr, I, LiU 35 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 36 6
Specifiction: the chrcter in column 1 must e n or. The chrcter in column 2 must e digit. In this sitution, the file updte is mde. If the first chrcter is incorrect, messge X12 is issued. If the second chrcter is not digit, messge X13 is issued. uses 1: chrcter in column 1 is 2: chrcter in column 1 is 3: chrcter in column 2 digit ffects 1: updte mde 2: messge X12 is issued 3:messge X13 is issued Smple cuse-effect grph 1 Intermedite node 2 11 2 1 3 3 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 37 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 38 onstrint symols Smple cuse-effect grph with exclusive constrint cuse-constrint: t most one of or cn e true I cuse-constrint: I t lest one of, nd c must lwys e true c 1 2 11: Intermedite node 11 2 1 R M O O cuse-constrint: one, nd only one, of nd must e true R cuse-constrint: for to e true, must e true M effect-constrint: If effect to is true, ffect is forced to e flse 3 3 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 39 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 40 ecision tle for cuse-nd effect grph Test 1 Test 2 Test 3 Test 4 use 1 1 0 0 X use 2 0 1 0 X use 3 1 1 X 0 ffect 1 1 1 0 0 ffect 2 0 0 1 0 ffect 3 0 0 0 1 Performnce Testing nonfunctionl requirements Stress s Volume s onfigurtion s omptiility s Regression s Security s Timing s nvironment s Qulity s Recovery s Mintennce s ocumenttion s Humn fctors s / usility s Jnury, 2007 US, S, Mrim Kmkr, I, LiU 41 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 42 7
cceptnce Testing customers, users need enchmrk : set of specil cses Pilot : everydy working lph : t the developer s site, controlled environment et : t one or more customer site. Instlltion Testing users site cceptnce t developers site instlltion t users site, otherwise my not e needed!! Prllel : new system in prllel with previous one Jnury, 2007 US, S, Mrim Kmkr, I, LiU 43 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 44 Test utomtion utomting prts of the ing process cn provide long-term enefits to orgniztion, such s: reducing the mount of time it tkes to execute suite of s reducing the er s involvement in executing s fcilitting regression ing llowing for the simultion of hundreds of users voiding humn mistkes y hving tools control repetitive nd tedious tsks Test utomtion refers to two key ing ctivities: xecuting the s vluting the output utomted Testing Tools ode nlysis tools Sttic, ynmic Test execution tools pture-nd-reply Stus & rivers omprtors Test cse genertor Jnury, 2007 US, S, Mrim Kmkr, I, LiU 45 Jnury, 2007 US, S, Mrim Kmkr, I, LiU 46 Termintion Prolem How decide when to stop ing The min prolem for mngers! Termintion tkes plce when resources (time & udget) re over found the seeded fults somecoverge is reched Jnury, 2007 US, S, Mrim Kmkr, I, LiU 47 8