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
how to write testcase for the output of an program ****0 ***01 **012 *0123 01234
What is explain security testing?
What is business validation test case?
what is black box system in software development in system analysis and design?
Explain the syntax testing?
How to write test cases for manual testing? What are the main syntex for writing test cases for Junit?
Explain the ad hoc testing?
Write all test cases for Bus Pass Renewal
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.
What is test environment? Elaborate with example.
Explain the ramp testing?
can anyone send me a copy of a business requirement and test cases attributed to such requirent. thank u
What is the toughest moment you faced in your testing carrier in which everyone praised you?
Explain the integration testing?
explain end to end scenario's for online Money transfer in Banking Domain?