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

Answers were Sorted based on User's Feedback



Tell me number of test cases required for full statement and branch coverage: Read P Read Q ..

Answer / santosh kumar singh

take p=70
and q=40
with this the full statement coverage

for the else part for branching
2 test cases for branches coverage.
take p=40
and q is same as above
with this the else part of both the block will be covered.

Santosh kumar Singh.

Is This Answer Correct ?    9 Yes 2 No

Tell me number of test cases required for full statement and branch coverage: Read P Read Q ..

Answer / 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

More Test Cases Interview Questions

Smoke Test Checklist for Gmail please someone help!

2 Answers   Microsoft,


can someone tell me the test cases for following scenario of password: 1. Password should be minimum 6 chars and maximum 8 chars. 2. Password should consists of 1 uppercase letter. 3. Password should consists of 1 numeric. 4. Password should consists of 1 special character.

2 Answers  


How to write test case for this scenario. The text field that reads “ enter SDU number or the city and state of the SDU” shall be removed from the contact screen 

0 Answers   Tops Technologies,


What are the test scenario's for pen like high priority high seviority?

4 Answers   NetWeb, Zycus Infotech,


Do we have to write the seperate test cases for System testing and UAT testing? And also what are the roles and reponsibilities of a tester/how to interact when End users are performing the UAT Testing.

0 Answers  


In manual testing, I have query regarding data conversion testing. I am working on xml document. How do we write test cases for below input as well as for output Input: <text>1. software Testing</text> Output: <paragraph><text><desig>1.</desig>software testing</text></paragraph>

0 Answers  


whai is the exactly meaning of test case

9 Answers  


write a test case for yahoo compose page?

0 Answers   Cap Gemini, CMC,


How to write test case for this scenario. The system shall compare the requested name with the Service Member Name field in the database

0 Answers  


Difference between Automation testing and manual testing.

18 Answers   Mphasis, SAP Labs,


Create Test Cases based on Software Testing Principles Write the Test Cases to validate Command Line utility - ‘MAX’. The utility displays the maximum of the 2 specified Integers. Please note down any assumptions that you make. e.g. MAX 2 3

1 Answers   SAP Labs, Satyam,


anybody can send cross site scripting test cases pls...

0 Answers  


Categories