Software Static and Dynamic Analysis

Static Analysis and  Dynamic Analysis in Software Testing:


What is Static Analysis in Software Testing?

  • Static analysis involve software under test to detect possible defects before running the program.
  • During testing software is not in execution mode.
  • Static analysis is done after coding.
  • Static analysis can be performed by a person or a machine.
  • In Static analysis a “walk through” is made through source code to detect:
    • Noncomplying rules. (For example compiler which find lexical, syntactic, semantic mistakes).
    • To ensure proper coding standards are used to construct program.
  • Static analysis forced developers not to used risky or buggy parts of the programming language.

What developers looks in Static Analysis in Software Testing?

  • Lines of Code
  • Proper nesting.
  • Comment frequency
  • Number of function calls
  • Cyclomatic complexity
  • Check of unit tests

Which quality attributes are focus in Static analysis?

  • Reliability
  • Maintainability
  • Testability
  • Re-usability
  • Portability

What are the Advantages of Static analysis ?

  • It can find defects in coding at exact location in source code.
  • It is easy to understand source code.
  • It allows fast defects fixing.
  • Defects can be found in starting of the development of software which reduces overall costing.
  • After Static analysis testing future test lest gives less defects compare to present test.
  • Some defects are easy to detect in Static analysis only, like:
    • Uncalled functions
    • Undeclared, unused variables
    • Unreachable code

What are the Disadvantages of Static analysis ?

  • Time consuming if conducted manually (By Humans not machines).
  • Static analysis automated tools are good for code scan only.
  • Static analysis automated tools may produce false positive and negative.
  • Static analysis not work when software is in execution.


What is Dynamic Analysis in Software testing?

  • Dynamic analysis is performed when software /coding is in execution.
  • Dynamic analysis often uses tools to perform testing.
  • Mostly unit testing is performed in Dynamic Testing.

What are the advantages of Dynamic analysis ?

  • It can be performed for any application.
  • It finds defects in runtime environment.
  • It allows application analysis without accessing its source code.
  • Use of it validates Static analysis findings.
  • It finds defects which were not included in Static Analysis.

What are the disadvantages of Dynamic Analysis?

  • Cannot guarantee that full source code is covered under testing.
  • Automated tools not ensure about security in testing.
  • Dynamic analysis automated tools may produce false positive and negative.
  • Dynamic analysis automated tools are good for code scan only.
  • Time consuming to fix the problem.
  • Difficult to find the exact location of defects.
More topics from Software Engineering to read
Software Engineering covered following topics in Software Engineering.
Python Programming ↓ 👆
Java Programming ↓ 👆
JAVA covered following topics in these notes.
JAVA Programs
Principles of Programming Languages ↓ 👆
Principles of Programming Languages covered following topics in these notes.

Previous years solved papers:
A list of Video lectures References:
  1. Sebesta,”Concept of programming Language”, Pearson Edu 
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
  4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

    Computer Organization and Architecture ↓ 👆

    Computer Organization and Architecture covered following topics in these notes.

    1. Structure of desktop computers
    2. Logic gates
    3. Register organization
    4. Bus structure
    5. Addressing modes
    6. Register transfer language
    7. Direct mapping numericals
    8. Register in Assembly Language Programming
    9. Arrays in Assembly Language Programming


    1. William stalling ,“Computer Architecture and Organization” PHI
    2. Morris Mano , “Computer System Organization ”PHI

    Computer Network ↓ 👆
    Computer Network covered following topics in these notes.
    1. Data Link Layer
    2. Framing
    3. Byte count framing method
    4. Flag bytes with byte stuffing framing method
    5. Flag bits with bit stuffing framing method
    6. Physical layer coding violations framing method
    7. Error control in data link layer
    8. Stop and Wait scheme
    9. Sliding Window Protocol
    10. One bit sliding window protocol
    11. A protocol Using Go-Back-N
    12. Selective repeat protocol
    13. Application layer
    1. Andrew S. Tanenbaum, David J. Wetherall, “Computer Networks” Pearson Education.
    2. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocols, And Architecture",Pearson Education
    3. KavehPahlavan, Prashant Krishnamurthy, “Networking Fundamentals”, Wiley Publication.
    4. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, “Computer Networks: An Open Source Approach”, McGraw Hill.