Static testing and dynamic testing are important testing methods available for developers and testers in Software Development lifecycle. These are software testing techniques which the organisation must choose carefully which to implement on the software application. In order to get the most out of each type of testing, and choose the right tools for a given situation, it’s crucial to understand the benefits and limitations of each type of testing.
What is Static Testing?
Static Testing is type of testing in which the code is not executed. It can be done manually or by a set of tools. This type of testing checks the code, requirement documents and design documents and puts review comments on the work document. When the software is non –operational and inactive, we perform security testing to analyse the software in non-runtime environment. With static testing, we try to find out the errors, code flaws and potentially malicious code in the software application. It starts earlier in development life cycle and hence it is also called verification testing. Static testing can be done on work documents like requirement specifications, design documents, source code, test plans, test scripts and test cases, web page content.
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.
What is Dynamic Testing?
Dynamic testing is done when the code is in operation mode. Dynamic testing is performed in runtime environment. When the code being executed is input with a value, the result or the output of the code is checked and compared with the expected output. With this we can observe the functional behaviour of the software, monitor the system memory, CPU response time, performance of the system. Dynamic testing is also known as validation testing , evaluating the finished product. Dynamic testing is of two types: Functional Testing and Non functional testing.
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.
However, both Static Testing and Dynamic Testing are important for the software application. There are number of strengths and weaknesses associated with both types of testing which should be considered while implementing these testing on code:
Difference between Static Testing and Dynamic Testing
|1. Static Testing is white box testing which is done at early stage if development life cycle. It is more cost effective than dynamic testing||1. Dynamic Testing on the other hand is done at the later stage of development lifecycle.|
|2. Static testing has more statement coverage than dynamic testing in shorter time||2. Dynamic Testing has less statement stage because it is covers limited area of code|
|3. It is done before code deployment||3. It is done after code deployment|
|4. It is performed in Verification Stage||4. It is done in Validation Stage|
|5. This type of testing is done without the execution of code.||5. This type of execution is done with the execution of code.|
|6. Static testing gives assessment of code as well as documentation.||6. Dynamic Testing gives bottlenecks of the software system.|
|7. In Static Testing techniques a checklist is prepared for testing process||7. In Dynamic Testing technique the test cases are executed.|
|8. Static Testing Methods include Walkthroughs, code review.||8. Dynamic testing involves functional and nonfunctional testing|
Example to differentiate between Static Testing and Dynamic Testing:
Software Application: Online Shopping Cart
Static Test Techniques:
- Review the requirement documents, design documents initially
- Checking the GUI of the application
- Checking the database structure of the application.
Dynamic Testing Techniques:
- Testing the functionality of the different page.
- Checking the checkout process and payment methods.
- Testing the interfaces between different pages.
Over to you:
In SDLC there Verification and Validation are two measures used to check software product meets requirement specifications. Static testing is software testing technique where testing is carried out without executing the code. This type of testing comes under Verification. There are different types of Static test techniques like Inspection, Walkthrough, Technical reviews and Informal reviews. Dynamic testing is software testing technique where testing is carried out with executing the code. This type of testing comes under Validation. There two different types of Dynamic test techniques like Unit Testing, Integration Testing, System Testing and Acceptance Testing. The Functional Testing and Non-Functional Testing comes under Dynamic testing.
Author: “Difference between static testing and dynamic testing” article is written by STC team member Sakshi Dewan.
Share your experience, comments in below comments. We are happy to answers your questions on Static and dynamic testing topic.
If you are not regular reader of this website then highly recommends you to Sign up for our free email newsletter!! Sign up just providing your email address below: