Static and Dynamic Analysis
Static analysis is done after coding and before executing unit tests.
Static analysis can be done by a machine to automatically “walk through” the source code and detect non complying rules. The classic example is a compiler which finds lexical, syntactic and even some semantic mistakes.
Static analysis can also be performed by a person who would review the code to ensure proper coding standards and conventions are used to construct the program. This is often called Code Review and is done by a peer developer, someone other than the developer who wrote the code.
Static analysis is also used to force developers to not use risky or buggy parts of the programming language by setting rules that must not be used.
In contrast to Static Analysis, where code is not executed, dynamic analysis is based on the system execution, often using tools.
Dynamic program analysis is the analysis of computer software that is performed with executing programs built from that software on a real or virtual processor (analysis performed without executing programs is known as static code analysis). Dynamic program analysis tools may require loading of special libraries or even recompilation of program code.
The most common dynamic analysis practice is executing Unit Tests against the code to find any errors in code.
Comments
Post a Comment