What is Static Testing?
Static testing is done without executing the program. It manually checks the code, requirements, and design documents for errors. Hence, the name “static”.
The main objective of this testing is to improve the quality of software artifacts. It finds errors in the early stages of the development cycle. This testing is also called a Non-execution technique or verification testing.
Static testing involves manual or automated reviews of the documents. This review is done during the initial testing phase to catch defects early in STLC. It examines work documents and provides review comments. Checks in code review, requirement documents, and design documents to find errors are examples of Static Testing.
This can be done formally or informally in a meeting by two or more development/QA engineers. Static Code Analysis testing is a white box testing technique where the developer tests their code without executing it.
What is Dynamic Testing?
In the Dynamic Testing application under test, code is executed. The main objective of this testing is to confirm that the product complies with the requirements.
This testing is also called validation testing. Dynamic testing executes the software and validates the output with the expected outcome.
It is performed at all levels of testing, and it can be either black or white box testing. It checks for the functional behavior of the software system and the overall performance of the system.
Static Testing vs Dynamic Testing
Some of the differences between Static and Dynamic Testing are as follows:
|Static Testing is done without executing the program. In static testing, code is not run to uncover bugs. The software team verifies software artifacts in this testing to find any flaws.
|Dynamic Testing is done by executing the program. In dynamic testing, code is executed to find bugs or confirm that it works well.
|Static Testing Examples:
|Functional and Non-Functional Testing are examples of Dynamic Testing.
Dynamic Testing Examples:
|Static testing is a Verification activity. Static testing involves verification.
|Dynamic testing is a Validation activity. Dynamic testing involves validation.
|Static Testing is about the prevention of defects.
|Dynamic Testing is about finding defects in the system.
|Static testing is more cost-effective and performed earlier in the life cycle.
|Dynamic Testing is performed later in the life cycle.
Software Testing Tutorials: