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
explain end to end scenario's for online Money transfer in Banking Domain?
How to write test case for this scenario. The Contact Information screen shall be displayed to the user during Case Update
can anybody help me how to write a test case for a program eg: c or C++ ,and also how to check their outputs
How to write test case for this scenario. The system shall allow for a wild card search for the last name with a minimum of one character
how to prepare a test case for online restaurant table reservation system. plz give an answer ASAP, email at suja_rvndrn@yahoo.co.in
What is test cases for mobile phone ?
Explain the state testing?
how to write testcase for the output of an program ****0 ***01 **012 *0123 01234
How to write a test cases for the following Please it is urgent Once user clicks that link Invite Friend page opens up thru which user can do 2 functions - first is to search friends detail(name, mail id) from her address book in other sites (india times, yahoo, gmail and rediff) and second to mail the invite to the selected person/s. User can send invite to multiple person at same time. Searching friends detail in other address books will work like this: - User will input name, email id, pwd etc, select from which site she want to get friends list and then click on Import. - Users address book from other sites will be imported in one shot(first time) to iDiva database. - It will be arranged in alphabetical order(complete list) and mail ids which are already used will be in different color. - User will be able to update her address book by clicking on ""Refresh"" button on the page, which will trigger the process again, and fetch new mail ids.
Hi Team, I have two scenarios ,only one step alone deference betweeen them and preconditions of Test scenarios are defferent . In the above sutuation , are we going divide test cases into two or can we club into them into a single. Regards seshu
"search"test cases on Linkedin website and how will you write test cases on it?
Write the test case for a login page?
Explain the scalability testing?
Can any one send me the Sample sanity Test Cases??? Mail id:veerabhadrudu.p@gmail.com
Describe to me what you see as a process. Not a particular process, just the basics of having a process.