For the following piece of code, how many test cases are needed to get 100% statement coverage?

Procedure X

Read (Color) // Input color from user

IF (Color == “Red”) THEN

Call Roses(Color)

ELSEIF (Color == “Blue”) THEN

Call Violets(Color)

ELSE

PRINT “User is no Shakespeare”

SaveToDatabase(Color)

End Procedure X

A. 5

B. 3

C. 1

D. 2



For the following piece of code, how many test cases are needed to get 100% statement coverage? P..

Answer / toshimathur

B

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Test Cases Interview Questions

what are test repository???? need for test repository/need for maintaining test cases?? advantages and disadvantages for maintaining test case??

2 Answers  


how to prepare a test case for online restaurant table reservation system. plz give an answer ASAP, email at suja_rvndrn@yahoo.co.in

0 Answers  


can any one give the format of writing test cases in excel sheet.

15 Answers   PCS,


What is the role of QA in a development project?

6 Answers  


Credit card field contains four text boxes. We can validate each textbox separately with conditions but how can we write integrated testcase for all the four?

0 Answers  






There is a game in that there are 20 levels an ordinary person can play it up to 12th level.So if you are a tester and if you have to test that game up to 20th level then how u can test that game.

0 Answers  


Give me 10 test cases on library management system

8 Answers  


how to make test case for anolog voice logger?

0 Answers  


Explain the branch coverage testing?

0 Answers  


How to write test case for this scenario. The Contact Information screen shall be displayed to the user during Case Create (Local Only),

1 Answers  


How can we write a good test case?

0 Answers  


Write 10 test cases for the condition P=R/I where R and I are integer and P is floating point.

6 Answers   Adobe,


Categories