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

Answer Posted / toshimathur

B

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a test case for yahoo compose page?

2291


I need GUI test case for home page?

3228


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?

1857


Explain the state testing?

641


How to write test case for this scenario. The Contact Information screen shall be displayed to the user during Case Update

1543






In a log in page what will be test procedure, test scenario, test description & test steps?

690


Explain the soak testing?

692


Write a test case for telephone?

699


Explain the ramp testing?

703


How to test Webservices and how can we write test cases for that

2904


can any body help me with providing a a case for usability testing...

1685


Write test cases for 8+4?

765


Write a test case of login window?

725


Explain the exactly meaning of test case?

702


Explain the branch coverage testing?

710