In this post, I will be sharing my views on Static Analysis and how the same is useful for Software Testing. Using Static Analysis in Testing will also be called as Static Testing.
The generic definition for Static Testing is that
Testing of an Application at the specification or implementation level without execution of that Application.
Static Analysis helps a lot for better Code Quality and we can perform the following set activities against the source code.
- Capture Metrics
- Complexity of the System (eg. Cyclomatic Complexity)
- Compliance against Standards (eg. check for the Java Coding Guidelines)
- Exception Handling (Captures the code that contains Unhandled exceptions)
- Infinite Loops
- Copy Paste Dectors (Most of the developers used to reuse the code via a copy paste and introduce some issues in the process)
- Duplicate Code
- Dead Code
We should be able to restrict most of the above said issues at very early stage of SDLC by applying Static Testing techniques and make these part of the build process.
Nice blog about static analysis in testing. I enjoyed reading your blog. Thanks
ReplyDeleteThank you
DeleteThis comment has been removed by the author.
ReplyDelete