Real difference between dynamic analysis and testing

dynamic-analysistesting

Often testing is regarded as a dynamic analysis of a software. Yet while writing my thesis, the reviewer noted to me that dynamic analysis is about analyzing the program behind the scenes – e.g. profiling and that it is not the same as testing because its "analysis" which looks inside and observes.
I know that "static analysis" is not testing, should we then separate this "dynamic analysis" also from testing? Some books do refer to dynamic analysis in this sense. I would maybe say that testing is a one mean of dynamic analysis?

As for testing definitions:

IEEE 829 broadens the idea to “analyzing,” thus including “static
testing.” And ISTQB takes the full step and includes both “dynamic and
static.” Testing is both dynamic and static.

So maybe it is just a matter of semantics? If testing is considered to be an analysis, then its both static and dynamic analysis is a testing approach.

Best Answer

Perhaps a good analogy is that (manual) testing is to dynamic analysis what code reviews are to static analysis. Both manual testing and dynamic analysis rely on the behaviour of code as it is executed to find problems.

But testing is not a means for dynamic analysis. For starters, dynamic analysis is automated. It also helps you observe behaviours that are not easily seen otherwise, such as memory usage and profiling. Testing, on the other hand, helps you assess qualities like usability and presentation, things you cannot ask a dynamic analysis tool to help you with.