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 differences between stlc and sdlc?
What do we need to build a quality QC team ? a QC manager with all junior QCs or a QC manager with all senior QCs?
What is quality center? How many built in tables does quality center have?
What’s the difference between a bug and a defect?
What are the advantages of waterfall model?
what types of bugs will we find out in banking projects
Write UI Test case, Integration Test case, Functional Test case & Performance Test case for the File Menu for MS-Word?
What is mean by multi-threading testing?
What is Dynamic Binding and Dynamic Loss?
Relative to other technical groups in the company? Relative to your staff?
Differentiate verification and validation?
What is localization testing (l10n testing)?
what are the advantages of manual and automation testing ? and which one would u term as efficent testing and effective testing ?pls do reply thankx in advance
What is test driver and test stub?
need answer interviewer will ask me about all project which i mention in resume or presently i'm working??please reply tomorrow is my interview