The big problem with instrumentation is that it involves memory and CPU overhead. Fully instrumented programs typically run up to three times slower than noninstrumented ones. A good decision for software testing is, therefore, to completely instrument only critical portions of a program. A case in point is ATAC, a publicly available tool written at Bell Communications Research for instrumenting C code. Large sources and complex applications are naturally harder to test than software with simple functionality.
Software metrics is one way of measuring the volume and complexity of an application.
This procedure looks at the structure and linkage between the larger software building blocks rather than at the level of statements and expressions. The two most often used metrics are the Halstead software science counts, which calculates code volume based on abstract operator and operand counts, and McCabe's cyclomatic complexity measure, which measures the number of control-flow nodes and edges. If you're new to test ing and have a complicated application to test, then metrics might help you find the most likely trouble spots within your code. Once you locate potential trouble spots, you can break these modules down or rewrite the parts of a program that exceed predefined metric limits. However, don't overestimate the value of metrics to software testing.