Find statement coverage and branch coverage:
1) Read P
Read Q
if P+Q>100
then print "Plarge"
endif
2. Disc=0
order_qty=0
Read order_qty
if order_qty>=20
Disc=0.05
if order_qty>=100 then
Disc=0.1
endif
endif
Answer Posted / nitin
for 1) - For stmnt. coverage we would require only 2 test
case to execute all the stmnts. in section 1.
for 2) For branch coverage we would require 3 test cases.
B'coz for every if condition we need to execute true and
false. So, false condition can be executed in a one go for
both IF condition and 2 test case would be required to
execute true for both IF condition.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
Please explain me v-model clearly i want to know how it works and want to know how it use in real time on a project please tell me its urgent and important for me understand .Please tell me my mail id is Chiku_69@yahoo.in Thank u
how to write the test cases for mark as read/unread mails for gmail inbox?and what are the testings we will do?
what is the testing approach for windows Explorer(Not IE Explorer)
Anyone attended the manual testing interview with L&T infotech in recent past. please let me know the type of questions they can ask especially in PM round. Thanks
What is system level testing?
What are the two main categories of software testing?
What is your daily process? I have 2+EXP IN MANUAL TESTING.PLEASE SUGGEST ME HOW i ANSWER
What are the typical risks that you identify during test planning and their mitigation plan and Contengency plan.
how to write defects in excel sheets when defects occured
explain ur testing project? how can u nexplain . what should we explain ? i have not worked on any project?
What is pesticide paradox?
What is Registry?
Describe some staff conflicts you have handled.
Is there any procedure of web-site development in manual testing. If yes what are factors we should test?
What is a defect?