
Static testing (Verification testing) and Dynamic testing (Validation testing) are the two very important software testing technique available for developers and testers in software development life cycle.
In order to get the most out of each type of testing, and to choose the
right tools for a given situation, it’s crucial to understand the
benefits and limitations of each type of testing.
Static testing is the one where a program is tested in an early phase of development, which involves technical review, code review before execution, walk-through, and analysis of data flow & control flow. Static Testing is type of testing in which the code is not executed. Further, its next counterpart is called as dynamic testing, which is performed on the actual environment where software is deployed. Dynamic testing is performed when the code is in operation mode/runtime environment.
Now, let's differentiate between both testing types to have better picture.
Static testing:
It is performed before the execution of code begin, therefore it does not require code execution.
It is very cost effective as it is performed on early stages of Software testing life cycle(STLC)
It is performed in the verification stage, hence it helps to check if the software meets the specifications.
It involves an early technical review of documentation, code and application design.
Various Automated tools are being used for static code analysis which makes it effective than manual work.
Static testing is very helpful to determine the root cause of the bugs.
The Static test techniques include:
Inspection: Here the main purpose is to find defects. Code walkthroughs are conducted by moderator. It is a formal type of review where a checklist is prepared to review the work documents.
Walkthrough: In this type of technique a meeting is lead by author to explain the product. Participants can ask questions and a scribe is assigned to make notes.
Technical reviews: In this type of static testing a technical round of review is conducted to check if the code is made according to technical specifications and standards. Generally the test plans, test strategy and test scripts are reviewed here.
Informal reviews: Static testing technique in which the document is reviewed informally and informal comments are provided.
Dynamic testing:
It is performed in a run time environment, so it required the code execution.
It is performed during ending phase of STLC, hence it is therefore not cost effective. Bugs found during this stage will add up additional cost to fix by development team and retesting by QA team
It is performed at the validation stage and helps to test if the software meet the customer expectations.
It involves functional and non-functional (performance, reliability & security, etc) testing of the application.
It involves both manual as well as automated testing and both are equally effective.
It mainly focus on finding new bugs rather than rely on determining the root cause.
Types of Dynamic Testing techniques are as follows:
Unit Testing: Testing of individual modules by developers.. The source code is tested in it.
Integration Testing: Testing the interface between different modules then they are joined..
System Testing: Testing performed on the system as a whole.
Acceptance Testing: Testing done from user point of view at user’s end.