Hi, Below is a question on white box testing. Kindly help
me in answering it. How many test cases are needed to
obtain 100% branch coverage. This question was asked in
ISTQB foudation level exam - Dec21 2008.
Read(A,C)
If(A<10) then Print A;
Endif
If(C>100) then Print C is greater then A
else if(C<100) then print only C
Endif else
Options -
a. 4
b. 3
c. 2
d. 1
Kindly answer with explanation so that it would be easy to
understand
Answer Posted / rama mohan parini
Require 3 Path test cases.
Test Case 1 - A is any value > 9 and C = 100 to check that
nothing is printed.
Test Case 2 - A is any value < 10 and C is > 100 to check
that Print A and
Print C is greater than A lines are printed
Test Case 3 - A is any value, and C is < 100 to check that
Print A ( only if A is < 10)
Print C is greater than A is printed.
We should use Cyclomatic complexity formula to calculate
number of paths easily
C = E - N + 2
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What if an organization is growing so fast that fixed testing processes are impossible? What to do in such situations?
Can list out some disadvantages of manual testing?
What impact ratings have you used in your projects?
what are the risk factors in the project? what is the base for testplan and entry criteria ,exit criteria for test plan?
Which criteria should take in account while doing CMS testing of any project?
If anybody from banglore having the real time exp in manual testing with 3+ yrs exp and looking for change send your profile to vinodhanandhan@gmail.com
Hi,Please can any one tell me about SAP Testing concepts.
Can automation testing replace manual testing?
Inwhat basis the time is allocated for testing the application?
Hello can anybody list out supported and unsupported browsers for Window OS,Android OS,MAC OS Ubuntu
What are the main key components in Web applications and Client Server applications? and their differences?
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 the purpose of test strategy?
How do you go about testing a project?
any one please send me any test case examples with tabular columns in manual testing