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


Please Help Members By Posting Answers For Below Questions

How do u determine,what to be tested?

1609


What is the difference between system testing and integration testing?

635


Hi All I want discuss abt Testing tools is any one available online in google chat?

1583


About Testing

1955


What r all the security problems u r facing & the measures taken to solve.

1830






What is CVS and why it is used?

1364


What types of testing is specifically important for web testing?

662


What do you mean by Unit Testing, Integration Testing, System Testing, and User Acceptance Testing and when do you do them?

7063


where can i learn domain knowledge? how cab i gain domain knowledge? what types of Questions can be asked in domain(BFSI)? PLZ REPLY ME

1460


tell wat u did in ur banking project?

1845


write the test case for Bulb & Mobile phone

7396


what is the critical defect in telecom domain?help me out from this prob its very urgent

3092


What is black box testing, and what are the various techniques?

713


What will be your approach if a particular script in Load Test fails?

1766


How much the bug is affecting the functionality of the application?

632