Software Testing | Static Testing
Static Testing is a type of a Software Testing method which is performed to check the defects in software without actually executing the code of the software application. Whereas in Dynamic Testing checks the code is executed to detect the defects.
Static testing is performed in early stage of development to avoid errors as it is easier to find sources of failures and it can be fixed easily. The errors that can’t not be found using Dynamic Testing, can be easily found by Static Testing.
Static Testing Techniques:
There are mainly two type techniques used in Static Testing:
In static testing review is a process or technique that is performed to find the potential defects in the design of the software. It is process to detect and remove errors and defects in the different supporting documents like software requirements specifications. People examine the documents and sorted out errors, redundancies and ambiguities.
Review is of four types:
In informal review the creator of the documents put the contents in front of audience and everyone gives their opinion and thus defects are identified in the early stage.
It is basically performed by experienced person or expert to check the defects so that there might not be problem further in the development or testing phase.
- Peer review:
Peer review means checking documents of one-another to detect and fix the defects. It is basically done in a team of colleagues.
Inspection is basically the verification of document the higher authority like the verification of software requirement specifications (SRS).
2. Static Analysis:
Static Analysis includes the evaluation of the code quality that is written by developers. Different tools are used to do the analysis of the code and comparison of the same with the standard.
It also helps in following identification of following defects:
(a) Unused variables (b) Dead code (c) Infinite loops (d) Variable with undefined value (e) Wrong syntax
Static Analysis is of three types:
- Data Flow:
Data flow is related to the stream processing.
- Control Flow:
Control flow is basically how the statements or instructions are executed.
- Cyclomatic Complexity:
Cyclomatic complexity is the measurement of the complexity of the program that is basically related to the number of independent paths in the control flow graph of the program.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.