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
How do u determine,what to be tested?
What is the difference between system testing and integration testing?
Hi All I want discuss abt Testing tools is any one available online in google chat?
About Testing
What r all the security problems u r facing & the measures taken to solve.
What is CVS and why it is used?
What types of testing is specifically important for web testing?
What do you mean by Unit Testing, Integration Testing, System Testing, and User Acceptance Testing and when do you do them?
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
tell wat u did in ur banking project?
write the test case for Bulb & Mobile phone
what is the critical defect in telecom domain?help me out from this prob its very urgent
What is black box testing, and what are the various techniques?
What will be your approach if a particular script in Load Test fails?
How much the bug is affecting the functionality of the application?