How to calculate Branch Coverage?
steven wrote:Hi Team,
I have been through some documents but have still been unable to understand on how to calculate Branch Coverage for a given scenario of an IF...THEN... ELSE statement.
Can someone please walk me through or give me a proper reference material which explains the same?
Thanks in Advance.
Branch coverage is a test of how much of the code the existing tests
are testing. It's not a measure of how good the code is. Cyclomatic
complexity, which also deal in part with conditionals, is the latter measure.
You cannot do branch coverage manually, at least not when dealing
with anything other than the most simple applications. There are many
code coverage tools available. However, we need to know which
language your system under test is being written in. You can check
the following tools lists for coverage tools for the languages your
code is using:
http://www.testingf aqs.org/
http://www.opensour cetesting. org/
http://www.qalinks. com/Tools/
http://www.aptest. com/resources. html
http://www.software qatest.com/ qattls1.html
How can we give you "proper reference material" when we don't know
which documents you've "been through" already? Listing those would
have helped. You might get more information if you search for
http://en.wikipedia .org/wiki/ Code_coverage Code Coverage.
Branch Coverage for Arbitrary Languages Made Easy
http://www.stickymi nds.com/s. asp?F=S3273_ ART_2
The abstract states "Branch coverage is an important measure of the
thoroughness of testing.".