verification metric(formula) of determining how many line of code in a given binary(DLL) are measured when run test cases against it.
Can figure out how many how much code has been tested for the specified test method.
Can judge how well the code/function is tested.
Do not tell how well code is written.
Metric for functional testing.
Add a utility Function for determining positive number.The function logic have a If and else block code inside.
Add Utility reference to a console application.
Add Unit test Project.
Run Test ctrl + R,T
VS Tab —> Test–> Analyze Code Coverage –> Selected Tests
In Code coverage Result Window –>> Show Code Coverage Coloring
Light Red — Not covered.
Case Could be either if/else condition block not covered.
Help to identify unreachable code.
Help to investigate gaps in testing.
Identify redundant test cases.