Can u any 1 please explain the below question and answer?
Given the following code, which statement is true about the
minimum 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
a) 1 test for statement coverage, 3 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
Answer Posted / dmitry
Correct Answer is "B"
b) 1 test for statement coverage, 2 for branch coverage
1) Statement coverage - 1 test.
P must be > than 50
P+Q must be > than 100
All statements (8 rows) are covered (used).
2) Decision coverage - 2 tests
2.1 P must be > than 50
P+Q must be > than 100
All "TRUE"(YES) decisions (1 and 2) are covered
2.1 P must be < than 50
P+Q must be < than 100
All "FALSE"(NO) decisions (1 and 2) are covered
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the queries mostly asked in testing ? give me some examples.
How many types of api testing are there?
write test case for gmail sign up page?
what comments have u given in peer review? tell me at least 3 comments what u have given? july27 brahma412@yahoo.co.in
Q) Create Preffered customer: As a customer when i purchase more than $5000 in goods since my first purchase, I become a preffered customer so that i can receive the benefits associated with that status.
What makes a good software qa engineer?
What are the RBI rules has to follow by a bank for online precesseing. ?
write test case for linked in sign up page ?
What is bug severity?
Test cases have written according to Flow of the software working or according to Screens?
What are the tasks of test closure activities in software testing?
What is a critical bug?
how to explain banking domain project in testing?
How the application is launched to the production environment?
What is the difference between stlc and sdlc?