What is Static Testing?
Static Testing Techniques provide a powerful way to improve the quality and productivity of software development by assisting engineers to recognize and fix their own defects early in the software development process. In this software is tested without executing the code by doing Review, Walk Through, Inspection or Analysis etc.
Static Testing may be conducted manually or through the use of various software testing tools. It starts early in the Software Development Life Cycle and so it is done during the Verification Process.
Static testing is not magic and it should not be considered a replacement for Dynamic Testing, but all software organizations should consider using reviews in all major aspects of their work including requirements, design, implementation, testing, and maintenance.
Types of defects that are easier to find during static testing are: deviations from standards, missing requirements, design defects, non-maintainable code and inconsistent interface specifications.
Techniques of Static Testing
- Review - Typically used to find and eliminate errors or ambiguities in documents such as requirements, design, test cases, etc.
- Informal Review
- WalkThrough
- Technical Review
- Inspection
- Static Analysis - The code written by developers are analysed (usually by tools) for structural defects that may lead to defects.
- Static Analysis
- Data Flow
- Control Flow
Advantages of Static Testing:
- Since static testing can start early in the life cycle, early feedback on quality issues can be established.
- By detecting defects at an early stage, rework costs are most often relatively low.
- Since rework effort is substantially reduced, development productivity figures are likely to increase.
- The evaluation by a team has the additional advantage that there is an exchange of information between the participants.
- Static tests contribute to an increased awareness of quality issues.
QUES. What can static analysis NOT find?
- The use of a variable before it has been defined
- Unreachable (“dead”) code
- Whether the value stored in a variable is correct
- The re - definition of a variable before it has been used
- Array bound violations
ANS. Whether the value stored in a variable is correct
QUES. Given the following types of tool, which tools would typically be used by developers and which by an independent test team:
- static analysis
- performance testing
- test management
- dynamic analysis
- test running
- test data preparation
ANS. Developers would typically use 1 and 4; test team 2, 3, 5 and 6
For more updates on Software Testing, please Subscribe to our Newsletter.
Please ask any questions on ForumsQA, in case of any issues or doubts.