You are on page 1of 4
IV Year—ISEMESTER TO PO OC Software Testing Lab Lab Assignments Problem Statement O1 Consider an automated banking application. The user ean dial the bank from a personal computer, providea sis-diait password. and follow witha scries of keyword commands that activate the banking function, ‘The software forthe application accepts data in the following form lank oF thr ber Prefix Throe-digitnumber. not beginning with Oor | Suifix Fourdigit number Password Six-charaeter alphanumeric "Withdrawal" Commands "Check status". "Deposit" Design adhoc test cases totest the sy stem Problem Statement 02 Consider an automated banking application. The user ean dial the bank from a personal computer, provide a sis-< password, and follow witha series of keyword commands that activate the banking function, The software forthe application accepts data in the following form ack lank or thr ber Three-digit number, not 6 Four-digit number Password ix-characteralphanumenc Commands Chock status". "Deposit". "Withdrawal" Design the test cases to test the system using follow ing Black Box testing technique BVA, Worst BVA, Robust BVA, RobustWorst BVA Equivalence classtesting (Input/Outputdomain) Problem Statement 03 Consider an application thatiss required to validate a numberaccording othe followin 1 A numbercan start with an optional sign 2. The optional sign can be followed by any numberof digits, 3. The digits can be optionally followed by a decimal point, represented by:a period 4. Ifthore is adecimal point, then there should be two digits alter the decimal S$ Any mumber-whetherornot ithas a decimal point, should be terminated a blank 6. Anumbercan start with anoptional sign 7. The optional sign can be followed by aay numberof diaits 8. The digits can be optionally followed by a decimal point, represented bya period 9. [Fthere is adecimal point. then there should be two digitsafter the decimal 10, Any numberashether ornotit has decimal point, should be terminated a blank. Ger and invalid numbers. (HINT) Use Decision table and cause erate Lesteases (0 test valid fe graph to generate test eases Problem Statement 04 Generate test cases using Black box testing technique to Calculate Standard Deduction on Taxable Income. ‘The standard deduction is higher for tax payers whoare 65 orolderor blind. Use the method given below to calculate tax. 1. The first factorthat determines the standard deduction is the filing status. The basic standard deduetion for the various filing status are Sing S4.750 Married, filing a joint retum $9,500 Married, filing a separate return $7.00 standard 2. fa married couple is filing separate retumsand ane spauise is not taking Deduction, the other spouse also Is not eligible for standard deduction 3. AnadditionalS1,000 isallowed asstandard deduction. ifeitherthe fileris 65 yrsor the spouse is 65 yrsor older {the latterease applicable when the filing status is" Married” and filing “joint”) 4. Anadditional $1,000 isallowedas: ease applicable when the filing status is married” and filing “joint”. indard deduction. if either the fileris blind orthe spouse is blind (the latter (HINT): From the above description. it is clear thatthe calculation of standard deduetion depends on the following 3 factors 1. Status of filing of the filer Age of the filer Whetherthe filer is blind ornot In addition, in certain cases, the following additional factorsalso come into play in caleulating the standard deduction 1. Whetherspouse has claimed standard deduction 2. Whetherspouse is blind 3, Whetherthe spouse ismore than 65 y Problem Statement 05 Consider the follow ing program segment 1 intmax inti intj.int k) 3. intmax 4 ate) then 5. if (i>k)thenma 6. elsemax=k, 7 else if > k) max>j 8. elsemay-k 9 return(max): 10.4 a) Draw the control flow graph forthis program seament b) Determine the cyclomatic complesity forthis program ©) Determine the independent paths Problem Statement 06 Source code of simple insertion sort implementation us language array in ascending order in ¢ programming #include=0)) fay 11 Kalil). forli= Las} al [-temp: printf("Aflersorting: ") for(i=O:issih +) printtt" %l” af] retum 0; HINT: for loop is representedas while loop aa) Draws the program graph for given program segment b) Determine the DD path graph ¢) Determine the independent paths d) Generatethe testeases for each independent path Problem Statement 07 Considera system having an FSM fora stack having the following states and transitions: States Initial: Before creation Empty: Numberof elements ~ 0 Holding: Number of elements 0, but less than the maximum capacity Full: Number elements =maximum Final: Afierdestruction Initial to Empty Create Empty to Holding. Empty to Full, Holding to Holding. Holding to Full: Add Empty to Final, Full (o Final, Holding to Final. Destroy Holding to Empty, Full t Holding, Full to Fmpty: Delete Design test cases forthis FSMusing state table-based testi Problem Statement 08 Given the following fragment of code, how many testsare required for 100% decision coverage? Give the test eases, ifwidth length then biggest dimension ~ width if height > width then biggest dimension= height end if estdimension= length then ifhe imenision =heightend_if cend_ifend if Hint 04 testeases Problem Statement 09 Given the following code, how much minimum numberof test cases is required for full statement and branch, coverage’ aad p read q ifptg> 100 then print"Large endif ifp = 30 then print"p La ndif Hint 1 testforstatement coverage. 2 for branch coverage

You might also like