0

I am trying to learn code coverage analysis; I am bit confused because the following code has loops.

Example if the code like this

read a;
read b;
i=0
if a>b
while(to i<a)
print(i)
i++;
end while
else
while(to i<b)
print(i)
i++;
end while
end if;

what is the percentage of statement coverage if a = 5 and b =7 ?

3
  • Could you expand a little on what you're asking?
    – jonrsharpe
    Commented Mar 30, 2020 at 13:47
  • What do you mean "how to do"? Are you trying to write a code coverage tool? Configure one? Read the results from one? Change your code according to those results? Give the context, what's the problem you're trying to solve?
    – jonrsharpe
    Commented Mar 30, 2020 at 13:52
  • hello thank you for replying i edited the question Commented Mar 30, 2020 at 13:59

0