Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Tell me number of test cases required for full statement
and branch coverage:
Read P
Read Q
IF P+Q > 100 THEN
Print “Large”
ENDIF
If P > 50 THEN
Print “P Large”
ENDIF

Answer Posted / saurabh_g

Since both the conditions are independent of each other :

(1) Branch Coverage :

2 Test cases are required.

1st test case : When P+Q > 100 is True (1st branch)
2nd test case : When p > 50 is True (2nd Branch)

(2) 100 % Statement coverage : Each executable statement
executed atleast once.

Again 2 Test cases are required.

1st test case : When P+Q > 100 is True
2nd test case : When p > 50 is True

(3) Path coverage :

4 Test cases are required because 4 paths are possible.

1st : When P+Q > 100 is true but P>50 is false
2nd : When both "P+Q > 100" and "P>50" are true.
3rd : When both "P+Q > 100" and "P>50" are false.
4th : When P+Q > 100 is false but P>50 is true.


Cheerz,
Saurabh Garg

Is This Answer Correct ?    4 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a test case flipkart login page

5923


Explain which test cases are written first black boxes or white boxes?

1112


What is explain security testing?

1181


Can anybody help me out to write test cases for booking train ticket online???

5752


how to write test cases for smart meter for gas and electricty

3018


how to make test case for anolog voice logger?

2500


Explain the load testing?

1190


how to test a UI and aslo we need to check a log data fil which gets populated in the db.for this two scenarios give me test cases

2528


Explain transaction testing?

1112


What are the Test Cases Comes under Regression Suite?

950


Positive and Negative test cases for the speedometer?(minimum 5 each)

2874


How to write test case for this scenario. The system shall auto populate the Email Address on the contact screen with the Email Address of the user profile 

2130


WE WANT HEALTHINSURENE PROJECT FUNCTIONAL TEST CASES

2951


explain end to end scenario's for online Money transfer in Banking Domain?

1982


What are the different check points for SIT and UAT while testing an Internet Banking application. Consider any one functionality of Internet Banking

1957