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 is scrum how with ex?
Upps..., sorry my email id is this : preet405p@yahoo.com Thanks in advanced.
Tell me the advantage and disadvantage of cookies?
What is baseline testing?
1.what is the approach while writing test cases in your project. 2.tell some intresting scenareo in your project
explain fish model in detail?
3. In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10%. The next £28000 after that is taxed at 22%. Any further amount is taxed at 40%. To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?
what exactly is heuristic checklist approach for unit testing?
how many modules in ur bank project? what functionalities r there?how did u check? could u plz expalin ur banking project?
What is Test methodology, Testing type , Testing approach, Testing technique & Testing methods. Explain with example.
What is an inspection in software testing?
Hi, I am planing to give ISTQB - Foundation level exam. Can anyone forward the ISTQB materials at laxmi_002@rediffmail.com mail ID.
How to do Pixel Size testing in a PDF document. Is there any Open tool that will be avaiable?
how to write test cases for epos/pos testing.
write 5 critical test cases on product payment form on flipkart.com?