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 test case for this scenario. The system shall compare the requested name with the Service Member Name field in the database
Can anybody help me in writing test cases for a scenario? need help at the earliest. will send you the requirement doc to your email id. thanks raj
How to write test case for this scenario. The First Name data entry field shall be removed from the existing Contact Information screen
test cases for friend finder system using gps?
Who will take care of test plan and test case?
For how many days (or) weeks you will test a product or software?
What is use case testing?
WE WANT HEALTHINSURENE PROJECT FUNCTIONAL TEST CASES
What is quick test professional and what test environment it supports?
consider a program module that inputs two (2) values, n and max, and computes the sum of the first n integers as long as this sum is less than max; otherwise an error should be reported. if n is negative, then it takes the absolute value. a) list the equivalence partitions, and b) list the boundary values.
Explain the dynamic testing?
1. Buzz Words 1.1 Purpose Allow user easy access of content based on key/popular words 1.2 Scope All the tags at the portal. 1.3 User Interface - Tags are usually hyperlinks that lead to a collection of items that are associated with the tag. - Click takes you to page similar to Search Result page, should search all content and not only articles - Based on Most Viewed only 1.4 Interfacing/Sourcing Details - Need to develop an application which works on algorithm to calculate size/color of Buzz words. - In phase 1 algorithm will be pretty straight forward of calculating dimesion of Buzz words by going by ""Most Viewed/Visited"" words. Need to get exact algorithm.
how to write test case for GUI testing and tell me in brief about GUI and all related WEB based testing..if possible then pls give example of its test case...m new in testing........thannx for help in advance
write a test case flipkart login page
How to write test cases for manual testing? What are the main syntex for writing test cases for Junit?