January 27, 2010

Explain Statement Coverage / Code Coverage / Line Coverage.

Statement Coverage or Code Coverage or Line Coverage is a metric used in White Box Testing where we can identify the statements executed and where the code is not executed cause of blockage. In this process each and every line of the code needs to be checked and executed.

Some advantages of Statement Coverage / Code Coverage / Line Coverage are,
· It verifies what the written code is expected to do and not to do.
· It measures the quality of code written.
· It checks the flow of different paths in the program also ensure whether those paths are tested or not.

To Calculate Statement Coverage,
Statement Coverage = Statements Tested / Total No. of Statements.

Bookmark this Blog to your Favorites