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

Need help to write test case for "Check Availability" field. Any help would be highly appreciated!

1 Answers   TCS,


write the high level test cases for winzip file

2 Answers   QA,


Writing Test cases based on the understanding of the UX document

1 Answers   Johnson Controls,


In general, how do you see automation fitting into the overall process of testing?

1 Answers   ABC,


How to write email id in world wide web

0 Answers  


what is the purpose of writing testcases

12 Answers  


Sample test cases for data conversion(Utility billing system)

0 Answers  


As we are using QTP 9.1 version, is there is any method to connect the remote desk top?

1 Answers  


How many test cases u will execute per day?

1 Answers  


pls i want test cases for telecom billing system

4 Answers  


how to execute test cases manually

1 Answers  


Circle any inconsistencies in the following text: User Story 3005 - Dave wishes to talk to Fred using a radio. Business Requirements: 1. Dave needs the ability to put a line into select. 2. Dave receives a visual color and text indication that the line is selected (picked up). a. Default indication will be that the pad turns red and the text ‘Select’ appears as the 3rd line of text. 3. David hears audio from a selected line in his defined audio path. 4. Dave uses Push-To-Talk to talk to Fred. 5. Dave receives a visual color and text indication that the line has been de-selected (hung up). • The default inactive state is a white pad with no text on the 2nd line. 6. Multiple Freds can select the same radio. 8. If a radio is selected while another radio is already selected, then the first phone is automatically deselected.

0 Answers  


Categories