Static Testing vs Dynamic Testing: What is the difference

Let us see the difference between Static Testing VS Dynamic Testing.

Static Testing Dynamic Testing
Testing performs without executing the program,

e.g you write the code, and now you are testing the code by just reviewing(with your eye and brain or some tool)the code.

Testing is done by executing the program.

e.g

you can test that the software is performing all the functions according to the software requirements or not.

This testing does the verification process.

e.g verifying the software documents, software design, and software code.

Dynamic testing test the validation process.

e.g you are testing that the written code of the software performs the functionality according to the user requirements or not.

Static testing is about the prevention of defects.

e.g

you write the code and before running the code, you are reviewing(with your eye and brain or some tool) the code to improve the code in such a way that code must look like error and defects free.

Dynamic testing is about finding and fixing the defects.

e.g

after the successful results of static testing, we run the program or complete software to test the further defects

The cost of finding and fixing the defects is less because you can know the defects early. The cost of finding and fixing defects is high because you know the defects very late. Now you need to again perform static testing and dynamic testing. So it is time wasting and leads to over budget.
Proft from the software will be high as the defects are known at an early stage Proft from the software will be low as the defects are known very late after the development of the software.
Static Testing can be performed before the compilation of the program or software. Dynamic testing is performed after the compilation of the program or software.
Static testing covers the structural and statement coverage testing Dynamic testing techniques are Boundary Value Analysis & Equivalence Partitioning.