The disadvantage of this approach is that it requires access to source code, which may not be available if you use third-party libraries. Tools that work at the executable level don't need information about the source. Purify doesn't even need to know what language the original application was written in. Instead, it treats contiguously allocated storage as a single memory item. There are a couple of techniques for measuring test coverage.
Statement coverage counts how many of the total statements in the application are executed.
Achieving 100 percent statement coverage shows that the tests are exercising every statement in the application, although it doesn't give you any measure of how much of the program structure was tested. An interesting side effect of 100 percent statement coverage is that it helps programmers find statements that can never be executed. This is because defining test procedures to execute a given statement makes developers look at an application in a new light. Some programmers say they remove almost 30 percent of the statements they find through this procedure. Path coverage , on the other hand, calculates the number of paths through an application.