97

ISBN : 978-81-963532-2-3 (E-Book) One white-box testing strategy is said to be stronger than another strategy, if all types of errorsdetected by thefirst testing strategy is also detected by the second testing strategy, and thesecondtestingstrategyadditionallydetectssomemoretypesoferrors.Whentwotestingstrategiesdet ecterrorsthataredifferentatleastwithrespecttosometypesoferrors,thentheyare called complementary. The concepts of stronger and complementary testing are schematicallyillustratedin fig.. Fig.Strongerand complementarytestingstrategies StatementCoverage The statement coverage strategy aims to design test cases so that every statement in a program isexecutedatleastonce.The principalidea governing thestatementcoveragestrategy isthatunless a statement is executed, it is very hard to determine if an error exists in that statement.Unlessastatementisexecuted,itisverydifficulttoobservewhetheritcausesfailureduetosome illegal memory access, wrong result computation, etc. However, executing some statementonceandobservingthatitbehavesproperlyforthatinputvalueisnoguaranteethatitwillbehavecorre ctlyforallinputvalues.Inthefollowing,designingof testcasesusingthestatementcoveragestrategyhavebeen shown. Example:ConsidertheEuclid’sGCDcomputationalgorithm:intc ompute_gcd(x,y) 92 Software Engineering Keerthana P, Manasa KN, Ganga D Bengal

98 Publizr Home


You need flash player to view this online publication