Course Process

Static Testing vs Dynamic Testing

Static Testing

During static testing, the software is examined manually or with the help of a tool using a review technique. Here code is not executed.

Types of defects found during static testing are – deviations from standards, missing requirements, design defects, non-maintainable code, and inconsistent interface specifications. 

Since it starts early in the life cycle thus an early validation of user requirements is done, and any defects identified at this stage costs relatively low with subsequent improvement in the quality of software. It examines work documents and likewise, product review comments with the help of a static design technique. 

Examples of work documents are Specifications, Design document, Source code, A Test plan, Test cases, Test script, Web page content.

Advantage of Static Testing

  1. It improves the quality of software products.
  2. It can be performed through the use of automated tools.
  3. It does not require the program to be executed.
  4. It finds errors and defects in the early stages of the software development life cycle.
  5. It involves an examination of the program’s code.
  6. It increases development productivity.

Disadvantage of static Testing

  1. It is time-consuming when performed manually.
  2. Automated tools only scan the code and do not point out the loopholes which might create trouble during run-time.


Dynamic Testing

Dynamic testing is a process that examines the expected behavior of the application based on dynamic inputs provided to the application.

The code is been executed which targets the runtime bugs/bottlenecks in the software system. The cost of finding and fixing defects is high as the defects are found later in the development cycle. It is also known as validation testing.

The testing which is performed as a part of dynamic testing are :

Unit testing: The smallest independent and testable part of the source code is referred to as unit testing. It is mostly performed by developers. 

Integration testing: Integration testing tests interfaces between components or functions which are integrated to form a system. It is performed by the testing team. 

System testing: In this system is checked and tested based on the risks and requirement specifications, business processes, and use cases. The testing is carried out from the user’s point of view.

Acceptance testing: Acceptance testing is done by real users or customers in a production environment. It focused on a validation type of testing.

Advantage of dynamic testing

  1. It identifies the weak area and bottlenecks that are hard to find with static testing
  2. It can be performed without understanding the code.
  3. User scenarios and functionality of the application can be thoroughly tested.
  4. Most of the test scenarios can be automated.

Disadvantage of
dynamic testing

  1. The cost and risk of fixing a defect are high in case of dynamic testing.
  2. It takes a longer time to fix the defect as it is difficult to trace the vulnerability in the code.
  3. All the test scenarios cannot be automated, some have to be performed only in a manual way.
  4. It is a very much time-consuming process when performed manually.


Difference between Static and Dynamic Testing

Static Testing Dynamic Testing
Static Testing is being done at an early stage in the development life cycle Dynamic Testing is being done at a later stage in the development life cycle
It is done before code deployment It is done after code deployment
The focus of static testing is to prevent defects The focus of static testing is to find and fixes the defects
It is done without executing the code It is done with the execution of code
In this case, the checklist is prepared for the testing process In this case, test cases are executed
Cost of finding defects and fixing is less in case of static testing Cost of finding defects and fixing is high in case of dynamic testing
Static testing covers structural and statement coverage testing technique Dynamic testing covers Boundary Value Analysis & Equivalence Partitioning testing technique
Static testing is a Verification Process Dynamic testing is a Validation Process
Static testing produces the analysis of the code along with the documentation Dynamic Testing reports the bottlenecks in the application
Static testing methods include a walkthrough, code reviews, etc. Dynamic testing methods include functional as well as non-functional testing